<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE BangPatterns #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE MultiWayIf #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">--</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Code generation for ticky-ticky profiling</span><span>
</span><span id="line-7"></span><span class="hs-comment">--</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- (c) The University of Glasgow 2004-2006</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-11"></span><span>
</span><span id="line-12"></span><span class="hs-comment">{- OVERVIEW: ticky ticky profiling

Please see
https://gitlab.haskell.org/ghc/ghc/wikis/debugging/ticky-ticky and also
edit it and the rest of this comment to keep them up-to-date if you
change ticky-ticky. Thanks!

 *** All allocation ticky numbers are in bytes. ***

Some of the relevant source files:

       ***not necessarily an exhaustive list***

  * some codeGen/ modules import this one

  * this module imports GHC.Cmm.CLabel to manage labels

  * GHC.Cmm.Parser expands some macros using generators defined in
    this module

  * includes/stg/Ticky.h declares all of the global counters

  * includes/rts/Ticky.h declares the C data type for an
    STG-declaration's counters

  * some macros defined in includes/Cmm.h (and used within the RTS's
    CMM code) update the global ticky counters

  * at the end of execution rts/Ticky.c generates the final report
    +RTS -r&lt;report-file&gt; -RTS

The rts/Ticky.c function that generates the report includes an
STG-declaration's ticky counters if

  * that declaration was entered, or

  * it was allocated (if -ticky-allocd)

On either of those events, the counter is &quot;registered&quot; by adding it to
a linked list; cf the CMM generated by registerTickyCtr.

Ticky-ticky profiling has evolved over many years. Many of the
counters from its most sophisticated days are no longer
active/accurate. As the RTS has changed, sometimes the ticky code for
relevant counters was not accordingly updated. Unfortunately, neither
were the comments.

As of March 2013, there still exist deprecated code and comments in
the code generator as well as the RTS because:

  * I don't know what is out-of-date versus merely commented out for
    momentary convenience, and

  * someone else might know how to repair it!

-}</span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.StgToCmm.Ticky</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-70"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterFun"><span class="hs-identifier">withNewTickyCounterFun</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-71"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterLNE"><span class="hs-identifier">withNewTickyCounterLNE</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-72"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterThunk"><span class="hs-identifier">withNewTickyCounterThunk</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-73"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterStdThunk"><span class="hs-identifier">withNewTickyCounterStdThunk</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-74"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterCon"><span class="hs-identifier">withNewTickyCounterCon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyDynAlloc"><span class="hs-identifier">tickyDynAlloc</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-77"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyAllocHeap"><span class="hs-identifier">tickyAllocHeap</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyAllocPrim"><span class="hs-identifier">tickyAllocPrim</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-80"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyAllocThunk"><span class="hs-identifier">tickyAllocThunk</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-81"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyAllocPAP"><span class="hs-identifier">tickyAllocPAP</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-82"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyHeapCheck"><span class="hs-identifier">tickyHeapCheck</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-83"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyStackCheck"><span class="hs-identifier">tickyStackCheck</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyDirectCall"><span class="hs-identifier">tickyDirectCall</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyPushUpdateFrame"><span class="hs-identifier">tickyPushUpdateFrame</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-88"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyUpdateFrameOmitted"><span class="hs-identifier">tickyUpdateFrameOmitted</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyEnterDynCon"><span class="hs-identifier">tickyEnterDynCon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyEnterFun"><span class="hs-identifier">tickyEnterFun</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-93"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyEnterThunk"><span class="hs-identifier">tickyEnterThunk</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-94"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyEnterLNE"><span class="hs-identifier">tickyEnterLNE</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyUpdateBhCaf"><span class="hs-identifier">tickyUpdateBhCaf</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-97"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyUnboxedTupleReturn"><span class="hs-identifier">tickyUnboxedTupleReturn</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-98"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyReturnOldCon"><span class="hs-identifier">tickyReturnOldCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyReturnNewCon"><span class="hs-identifier">tickyReturnNewCon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-99"></span><span>
</span><span id="line-100"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickySlowCall"><span class="hs-identifier">tickySlowCall</span></a></span><span>
</span><span id="line-101"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-106"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.StgToCmm.ArgRep.html"><span class="hs-identifier">GHC.StgToCmm.ArgRep</span></a></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.StgToCmm.ArgRep.html#slowCallPattern"><span class="hs-identifier">slowCallPattern</span></a></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.ArgRep.html#toArgRep"><span class="hs-identifier">toArgRep</span></a></span><span> </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.ArgRep.html#argRepString"><span class="hs-identifier">argRepString</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-107"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html"><span class="hs-identifier">GHC.StgToCmm.Closure</span></a></span><span>
</span><span id="line-108"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Utils.html"><span class="hs-identifier">GHC.StgToCmm.Utils</span></a></span><span>
</span><span id="line-109"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html"><span class="hs-identifier">GHC.StgToCmm.Monad</span></a></span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Stg.Syntax.html"><span class="hs-identifier">GHC.Stg.Syntax</span></a></span><span>
</span><span id="line-112"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html"><span class="hs-identifier">GHC.Cmm.Expr</span></a></span><span>
</span><span id="line-113"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Graph.html"><span class="hs-identifier">GHC.Cmm.Graph</span></a></span><span>
</span><span id="line-114"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Utils.html"><span class="hs-identifier">GHC.Cmm.Utils</span></a></span><span>
</span><span id="line-115"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html"><span class="hs-identifier">GHC.Cmm.CLabel</span></a></span><span>
</span><span id="line-116"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html"><span class="hs-identifier">GHC.Runtime.Heap.Layout</span></a></span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-119"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>
</span><span id="line-120"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>
</span><span id="line-121"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-122"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-123"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span class="hs-comment">-- Turgid imports for showTypeCategory</span><span>
</span><span id="line-128"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Builtin.Names.html"><span class="hs-identifier">GHC.Builtin.Names</span></a></span><span>
</span><span id="line-129"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.TcType.html"><span class="hs-identifier">GHC.Tc.Utils.TcType</span></a></span><span>
</span><span id="line-130"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html"><span class="hs-identifier">GHC.Core.DataCon</span></a></span><span>
</span><span id="line-131"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html"><span class="hs-identifier">GHC.Core.TyCon</span></a></span><span>
</span><span id="line-132"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Predicate.html"><span class="hs-identifier">GHC.Core.Predicate</span></a></span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-135"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Data.Char.html#"><span class="hs-identifier">Data.Char</span></a></span><span>
</span><span id="line-136"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier">when</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-139"></span><span class="hs-comment">--</span><span>
</span><span id="line-140"></span><span class="hs-comment">-- Ticky-ticky profiling</span><span>
</span><span id="line-141"></span><span class="hs-comment">--</span><span>
</span><span id="line-142"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-143"></span><span>
</span><span id="line-144"></span><span class="hs-keyword">data</span><span> </span><span id="TickyClosureType"><span class="annot"><a href="GHC.StgToCmm.Ticky.html#TickyClosureType"><span class="hs-identifier hs-var">TickyClosureType</span></a></span></span><span>
</span><span id="line-145"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span id="TickyFun"><span class="annot"><a href="GHC.StgToCmm.Ticky.html#TickyFun"><span class="hs-identifier hs-var">TickyFun</span></a></span></span><span>
</span><span id="line-146"></span><span>        </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- True &lt;-&gt; single entry</span><span>
</span><span id="line-147"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="TickyCon"><span class="annot"><a href="GHC.StgToCmm.Ticky.html#TickyCon"><span class="hs-identifier hs-var">TickyCon</span></a></span></span><span>
</span><span id="line-148"></span><span>        </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-comment">-- the allocated constructor</span><span>
</span><span id="line-149"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="TickyThunk"><span class="annot"><a href="GHC.StgToCmm.Ticky.html#TickyThunk"><span class="hs-identifier hs-var">TickyThunk</span></a></span></span><span>
</span><span id="line-150"></span><span>        </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- True &lt;-&gt; updateable</span><span>
</span><span id="line-151"></span><span>        </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- True &lt;-&gt; standard thunk (AP or selector), has no entry counter</span><span>
</span><span id="line-152"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="TickyLNE"><span class="annot"><a href="GHC.StgToCmm.Ticky.html#TickyLNE"><span class="hs-identifier hs-var">TickyLNE</span></a></span></span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span id="local-6989586621681051958"><span class="annot"><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterFun"><span class="hs-identifier hs-type">withNewTickyCounterFun</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681051958"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681051958"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-155"></span><span id="withNewTickyCounterFun"><span class="annot"><span class="annottext">withNewTickyCounterFun :: forall a. Bool -&gt; Name -&gt; [NonVoid Id] -&gt; FCode a -&gt; FCode a
</span><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterFun"><span class="hs-identifier hs-var hs-var">withNewTickyCounterFun</span></a></span></span><span> </span><span id="local-6989586621681051739"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051739"><span class="hs-identifier hs-var">single_entry</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TickyClosureType -&gt; Name -&gt; [NonVoid Id] -&gt; FCode a -&gt; FCode a
forall a.
TickyClosureType -&gt; Name -&gt; [NonVoid Id] -&gt; FCode a -&gt; FCode a
</span><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounter"><span class="hs-identifier hs-var">withNewTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; TickyClosureType
</span><a href="GHC.StgToCmm.Ticky.html#TickyFun"><span class="hs-identifier hs-var">TickyFun</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051739"><span class="hs-identifier hs-var">single_entry</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span id="local-6989586621681051954"><span class="annot"><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterLNE"><span class="hs-identifier hs-type">withNewTickyCounterLNE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681051954"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681051954"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-158"></span><span id="withNewTickyCounterLNE"><span class="annot"><span class="annottext">withNewTickyCounterLNE :: forall a. Name -&gt; [NonVoid Id] -&gt; FCode a -&gt; FCode a
</span><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterLNE"><span class="hs-identifier hs-var hs-var">withNewTickyCounterLNE</span></a></span></span><span> </span><span id="local-6989586621681051736"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051736"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span id="local-6989586621681051735"><span class="annot"><span class="annottext">[NonVoid Id]
</span><a href="#local-6989586621681051735"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span id="local-6989586621681051734"><span class="annot"><span class="annottext">FCode a
</span><a href="#local-6989586621681051734"><span class="hs-identifier hs-var">code</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-159"></span><span>  </span><span id="local-6989586621681051733"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051733"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode Bool
</span><a href="GHC.StgToCmm.Ticky.html#tickyLNEIsOn"><span class="hs-identifier hs-var">tickyLNEIsOn</span></a></span><span>
</span><span id="line-160"></span><span>  </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051733"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">FCode a
</span><a href="#local-6989586621681051734"><span class="hs-identifier hs-var">code</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">TickyClosureType -&gt; Name -&gt; [NonVoid Id] -&gt; FCode a -&gt; FCode a
forall a.
TickyClosureType -&gt; Name -&gt; [NonVoid Id] -&gt; FCode a -&gt; FCode a
</span><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounter"><span class="hs-identifier hs-var">withNewTickyCounter</span></a></span><span> </span><span class="annot"><span class="annottext">TickyClosureType
</span><a href="GHC.StgToCmm.Ticky.html#TickyLNE"><span class="hs-identifier hs-var">TickyLNE</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051736"><span class="hs-identifier hs-var">nm</span></a></span><span> </span><span class="annot"><span class="annottext">[NonVoid Id]
</span><a href="#local-6989586621681051735"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">FCode a
</span><a href="#local-6989586621681051734"><span class="hs-identifier hs-var">code</span></a></span><span>
</span><span id="line-161"></span><span>
</span><span id="line-162"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#thunkHasCounter"><span class="hs-identifier hs-type">thunkHasCounter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-163"></span><span id="thunkHasCounter"><span class="annot"><span class="annottext">thunkHasCounter :: Bool -&gt; FCode Bool
</span><a href="GHC.StgToCmm.Ticky.html#thunkHasCounter"><span class="hs-identifier hs-var hs-var">thunkHasCounter</span></a></span></span><span> </span><span id="local-6989586621681051729"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051729"><span class="hs-identifier hs-var">isStatic</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-164"></span><span>  </span><span id="local-6989586621681051728"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051728"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode Bool
</span><a href="GHC.StgToCmm.Ticky.html#tickyDynThunkIsOn"><span class="hs-identifier hs-var">tickyDynThunkIsOn</span></a></span><span>
</span><span id="line-165"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; FCode Bool
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051729"><span class="hs-identifier hs-var">isStatic</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051728"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-166"></span><span>
</span><span id="line-167"></span><span id="local-6989586621681051950"><span class="annot"><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterThunk"><span class="hs-identifier hs-type">withNewTickyCounterThunk</span></a></span><span>
</span><span id="line-168"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- ^ static</span><span>
</span><span id="line-169"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- ^ updateable</span><span>
</span><span id="line-170"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-171"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681051950"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-172"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681051950"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-173"></span><span id="withNewTickyCounterThunk"><span class="annot"><span class="annottext">withNewTickyCounterThunk :: forall a. Bool -&gt; Bool -&gt; Name -&gt; FCode a -&gt; FCode a
</span><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterThunk"><span class="hs-identifier hs-var hs-var">withNewTickyCounterThunk</span></a></span></span><span> </span><span id="local-6989586621681051724"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051724"><span class="hs-identifier hs-var">isStatic</span></a></span></span><span> </span><span id="local-6989586621681051723"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051723"><span class="hs-identifier hs-var">isUpdatable</span></a></span></span><span> </span><span id="local-6989586621681051722"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051722"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621681051721"><span class="annot"><span class="annottext">FCode a
</span><a href="#local-6989586621681051721"><span class="hs-identifier hs-var">code</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-174"></span><span>    </span><span id="local-6989586621681051720"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051720"><span class="hs-identifier hs-var">has_ctr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; FCode Bool
</span><a href="GHC.StgToCmm.Ticky.html#thunkHasCounter"><span class="hs-identifier hs-var">thunkHasCounter</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051724"><span class="hs-identifier hs-var">isStatic</span></a></span><span>
</span><span id="line-175"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051720"><span class="hs-identifier hs-var">has_ctr</span></a></span><span>
</span><span id="line-176"></span><span>      </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">FCode a
</span><a href="#local-6989586621681051721"><span class="hs-identifier hs-var">code</span></a></span><span>
</span><span id="line-177"></span><span>      </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">TickyClosureType -&gt; Name -&gt; [NonVoid Id] -&gt; FCode a -&gt; FCode a
forall a.
TickyClosureType -&gt; Name -&gt; [NonVoid Id] -&gt; FCode a -&gt; FCode a
</span><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounter"><span class="hs-identifier hs-var">withNewTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; TickyClosureType
</span><a href="GHC.StgToCmm.Ticky.html#TickyThunk"><span class="hs-identifier hs-var">TickyThunk</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051723"><span class="hs-identifier hs-var">isUpdatable</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051722"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">FCode a
</span><a href="#local-6989586621681051721"><span class="hs-identifier hs-var">code</span></a></span><span>
</span><span id="line-178"></span><span>
</span><span id="line-179"></span><span id="local-6989586621681051947"><span class="annot"><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterStdThunk"><span class="hs-identifier hs-type">withNewTickyCounterStdThunk</span></a></span><span>
</span><span id="line-180"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- ^ updateable</span><span>
</span><span id="line-181"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-182"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681051947"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-183"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681051947"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-184"></span><span id="withNewTickyCounterStdThunk"><span class="annot"><span class="annottext">withNewTickyCounterStdThunk :: forall a. Bool -&gt; Name -&gt; FCode a -&gt; FCode a
</span><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterStdThunk"><span class="hs-identifier hs-var hs-var">withNewTickyCounterStdThunk</span></a></span></span><span> </span><span id="local-6989586621681051718"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051718"><span class="hs-identifier hs-var">isUpdatable</span></a></span></span><span> </span><span id="local-6989586621681051717"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051717"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621681051716"><span class="annot"><span class="annottext">FCode a
</span><a href="#local-6989586621681051716"><span class="hs-identifier hs-var">code</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-185"></span><span>    </span><span id="local-6989586621681051715"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051715"><span class="hs-identifier hs-var">has_ctr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; FCode Bool
</span><a href="GHC.StgToCmm.Ticky.html#thunkHasCounter"><span class="hs-identifier hs-var">thunkHasCounter</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-186"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051715"><span class="hs-identifier hs-var">has_ctr</span></a></span><span>
</span><span id="line-187"></span><span>      </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">FCode a
</span><a href="#local-6989586621681051716"><span class="hs-identifier hs-var">code</span></a></span><span>
</span><span id="line-188"></span><span>      </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">TickyClosureType -&gt; Name -&gt; [NonVoid Id] -&gt; FCode a -&gt; FCode a
forall a.
TickyClosureType -&gt; Name -&gt; [NonVoid Id] -&gt; FCode a -&gt; FCode a
</span><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounter"><span class="hs-identifier hs-var">withNewTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; TickyClosureType
</span><a href="GHC.StgToCmm.Ticky.html#TickyThunk"><span class="hs-identifier hs-var">TickyThunk</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051718"><span class="hs-identifier hs-var">isUpdatable</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051717"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">FCode a
</span><a href="#local-6989586621681051716"><span class="hs-identifier hs-var">code</span></a></span><span>
</span><span id="line-189"></span><span>
</span><span id="line-190"></span><span id="local-6989586621681051944"><span class="annot"><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterCon"><span class="hs-identifier hs-type">withNewTickyCounterCon</span></a></span><span>
</span><span id="line-191"></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span>
</span><span id="line-192"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span>
</span><span id="line-193"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681051944"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-194"></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681051944"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-195"></span><span id="withNewTickyCounterCon"><span class="annot"><span class="annottext">withNewTickyCounterCon :: forall a. Name -&gt; DataCon -&gt; FCode a -&gt; FCode a
</span><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounterCon"><span class="hs-identifier hs-var hs-var">withNewTickyCounterCon</span></a></span></span><span> </span><span id="local-6989586621681051713"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051713"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621681051712"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681051712"><span class="hs-identifier hs-var">datacon</span></a></span></span><span> </span><span id="local-6989586621681051711"><span class="annot"><span class="annottext">FCode a
</span><a href="#local-6989586621681051711"><span class="hs-identifier hs-var">code</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-196"></span><span>    </span><span id="local-6989586621681051710"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051710"><span class="hs-identifier hs-var">has_ctr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; FCode Bool
</span><a href="GHC.StgToCmm.Ticky.html#thunkHasCounter"><span class="hs-identifier hs-var">thunkHasCounter</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-197"></span><span>    </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051710"><span class="hs-identifier hs-var">has_ctr</span></a></span><span>
</span><span id="line-198"></span><span>      </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">FCode a
</span><a href="#local-6989586621681051711"><span class="hs-identifier hs-var">code</span></a></span><span>
</span><span id="line-199"></span><span>      </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">TickyClosureType -&gt; Name -&gt; [NonVoid Id] -&gt; FCode a -&gt; FCode a
forall a.
TickyClosureType -&gt; Name -&gt; [NonVoid Id] -&gt; FCode a -&gt; FCode a
</span><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounter"><span class="hs-identifier hs-var">withNewTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; TickyClosureType
</span><a href="GHC.StgToCmm.Ticky.html#TickyCon"><span class="hs-identifier hs-var">TickyCon</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681051712"><span class="hs-identifier hs-var">datacon</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051713"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">FCode a
</span><a href="#local-6989586621681051711"><span class="hs-identifier hs-var">code</span></a></span><span>
</span><span id="line-200"></span><span>
</span><span id="line-201"></span><span class="hs-comment">-- args does not include the void arguments</span><span>
</span><span id="line-202"></span><span id="local-6989586621681051955"><span class="annot"><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounter"><span class="hs-identifier hs-type">withNewTickyCounter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#TickyClosureType"><span class="hs-identifier hs-type">TickyClosureType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681051955"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681051955"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-203"></span><span id="withNewTickyCounter"><span class="annot"><span class="annottext">withNewTickyCounter :: forall a.
TickyClosureType -&gt; Name -&gt; [NonVoid Id] -&gt; FCode a -&gt; FCode a
</span><a href="GHC.StgToCmm.Ticky.html#withNewTickyCounter"><span class="hs-identifier hs-var hs-var">withNewTickyCounter</span></a></span></span><span> </span><span id="local-6989586621681051708"><span class="annot"><span class="annottext">TickyClosureType
</span><a href="#local-6989586621681051708"><span class="hs-identifier hs-var">cloType</span></a></span></span><span> </span><span id="local-6989586621681051707"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051707"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621681051706"><span class="annot"><span class="annottext">[NonVoid Id]
</span><a href="#local-6989586621681051706"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span id="local-6989586621681051705"><span class="annot"><span class="annottext">FCode a
</span><a href="#local-6989586621681051705"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-204"></span><span>  </span><span id="local-6989586621681051704"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051704"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TickyClosureType -&gt; Name -&gt; [NonVoid Id] -&gt; FCode CLabel
</span><a href="GHC.StgToCmm.Ticky.html#emitTickyCounter"><span class="hs-identifier hs-var">emitTickyCounter</span></a></span><span> </span><span class="annot"><span class="annottext">TickyClosureType
</span><a href="#local-6989586621681051708"><span class="hs-identifier hs-var">cloType</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051707"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">[NonVoid Id]
</span><a href="#local-6989586621681051706"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-205"></span><span>  </span><span class="annot"><span class="annottext">CLabel -&gt; FCode a -&gt; FCode a
forall a. CLabel -&gt; FCode a -&gt; FCode a
</span><a href="GHC.StgToCmm.Monad.html#setTickyCtrLabel"><span class="hs-identifier hs-var">setTickyCtrLabel</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051704"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">FCode a
</span><a href="#local-6989586621681051705"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-206"></span><span>
</span><span id="line-207"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#emitTickyCounter"><span class="hs-identifier hs-type">emitTickyCounter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#TickyClosureType"><span class="hs-identifier hs-type">TickyClosureType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.StgToCmm.Closure.html#NonVoid"><span class="hs-identifier hs-type">NonVoid</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span>
</span><span id="line-208"></span><span id="emitTickyCounter"><span class="annot"><span class="annottext">emitTickyCounter :: TickyClosureType -&gt; Name -&gt; [NonVoid Id] -&gt; FCode CLabel
</span><a href="GHC.StgToCmm.Ticky.html#emitTickyCounter"><span class="hs-identifier hs-var hs-var">emitTickyCounter</span></a></span></span><span> </span><span id="local-6989586621681051701"><span class="annot"><span class="annottext">TickyClosureType
</span><a href="#local-6989586621681051701"><span class="hs-identifier hs-var">cloType</span></a></span></span><span> </span><span id="local-6989586621681051700"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051700"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621681051699"><span class="annot"><span class="annottext">[NonVoid Id]
</span><a href="#local-6989586621681051699"><span class="hs-identifier hs-var">args</span></a></span></span><span>
</span><span id="line-209"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681051698"><span class="annot"><span class="annottext">ctr_lbl :: CLabel
</span><a href="#local-6989586621681051698"><span class="hs-identifier hs-var hs-var">ctr_lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkRednCountsLabel"><span class="hs-identifier hs-var">mkRednCountsLabel</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051700"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-210"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FCode () -&gt; FCode CLabel -&gt; FCode CLabel
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; FCode CLabel
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051698"><span class="hs-identifier hs-var">ctr_lbl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode CLabel) -&gt; FCode () -&gt; FCode CLabel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-211"></span><span>    </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-212"></span><span>        </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681051695"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051695"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-213"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681051693"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051693"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode Platform
</span><a href="GHC.StgToCmm.Monad.html#getPlatform"><span class="hs-identifier hs-var">getPlatform</span></a></span><span>
</span><span id="line-214"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681051691"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051691"><span class="hs-identifier hs-var">parent</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode CLabel
</span><a href="GHC.StgToCmm.Monad.html#getTickyCtrLabel"><span class="hs-identifier hs-var">getTickyCtrLabel</span></a></span><span>
</span><span id="line-215"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681051689"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681051689"><span class="hs-identifier hs-var">mod_name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode Module
</span><a href="GHC.StgToCmm.Monad.html#getModuleName"><span class="hs-identifier hs-var">getModuleName</span></a></span><span>
</span><span id="line-216"></span><span>
</span><span id="line-217"></span><span>          </span><span class="hs-comment">-- When printing the name of a thing in a ticky file, we</span><span>
</span><span id="line-218"></span><span>          </span><span class="hs-comment">-- want to give the module name even for *local* things.  We</span><span>
</span><span id="line-219"></span><span>          </span><span class="hs-comment">-- print just &quot;x (M)&quot; rather that &quot;M.x&quot; to distinguish them</span><span>
</span><span id="line-220"></span><span>          </span><span class="hs-comment">-- from the global kind.</span><span>
</span><span id="line-221"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="#local-6989586621681051687"><span class="hs-identifier hs-type">ppr_for_ticky_name</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-222"></span><span>              </span><span id="local-6989586621681051687"><span class="annot"><span class="annottext">ppr_for_ticky_name :: SDoc
</span><a href="#local-6989586621681051687"><span class="hs-identifier hs-var hs-var">ppr_for_ticky_name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-223"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681051684"><span class="annot"><span class="annottext">n :: SDoc
</span><a href="#local-6989586621681051684"><span class="hs-identifier hs-var hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051700"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-224"></span><span>                    </span><span id="local-6989586621681051681"><span class="annot"><span class="annottext">ext :: SDoc
</span><a href="#local-6989586621681051681"><span class="hs-identifier hs-var hs-var">ext</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">TickyClosureType
</span><a href="#local-6989586621681051701"><span class="hs-identifier hs-var">cloType</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-225"></span><span>                              </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#TickyFun"><span class="hs-identifier hs-type">TickyFun</span></a></span><span> </span><span id="local-6989586621681051680"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051680"><span class="hs-identifier hs-var">single_entry</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; [SDoc]) -&gt; [SDoc] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-226"></span><span>                                  </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;fun&quot;</span></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; [SDoc] -&gt; [SDoc]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;se&quot;</span></span><span class="hs-glyph">|</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051680"><span class="hs-identifier hs-var">single_entry</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-227"></span><span>                              </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#TickyCon"><span class="hs-identifier hs-type">TickyCon</span></a></span><span> </span><span id="local-6989586621681051674"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681051674"><span class="hs-identifier hs-var">datacon</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;con:&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier hs-var">dataConName</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681051674"><span class="hs-identifier hs-var">datacon</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-228"></span><span>                              </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#TickyThunk"><span class="hs-identifier hs-type">TickyThunk</span></a></span><span> </span><span id="local-6989586621681051671"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051671"><span class="hs-identifier hs-var">upd</span></a></span></span><span> </span><span id="local-6989586621681051670"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051670"><span class="hs-identifier hs-var">std</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; [SDoc] -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; [SDoc]) -&gt; [SDoc] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-229"></span><span>                                  </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;thk&quot;</span></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; [SDoc] -&gt; [SDoc]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;se&quot;</span></span><span class="hs-glyph">|</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051671"><span class="hs-identifier hs-var">upd</span></a></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; [SDoc] -&gt; [SDoc]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;std&quot;</span></span><span class="hs-glyph">|</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051670"><span class="hs-identifier hs-var">std</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-230"></span><span>                              </span><span class="annot"><span class="annottext">TickyClosureType
</span><a href="GHC.StgToCmm.Ticky.html#TickyLNE"><span class="hs-identifier hs-var">TickyLNE</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isInternalName"><span class="hs-identifier hs-var">isInternalName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051700"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;LNE&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-231"></span><span>                                       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;emitTickyCounter: how is this an external LNE?&quot;</span></span><span>
</span><span id="line-232"></span><span>                    </span><span id="local-6989586621681051665"><span class="annot"><span class="annottext">p :: SDoc
</span><a href="#local-6989586621681051665"><span class="hs-identifier hs-var hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; Maybe Name
</span><a href="GHC.Cmm.CLabel.html#hasHaskellName"><span class="hs-identifier hs-var">hasHaskellName</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051691"><span class="hs-identifier hs-var">parent</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-233"></span><span>                            </span><span class="hs-comment">-- NB the default &quot;top&quot; ticky ctr does not</span><span>
</span><span id="line-234"></span><span>                            </span><span class="hs-comment">-- have a Haskell name</span><span>
</span><span id="line-235"></span><span>                          </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681051663"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051663"><span class="hs-identifier hs-var">pname</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;in&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Unique
</span><a href="GHC.Types.Name.html#nameUnique"><span class="hs-identifier hs-var">nameUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051663"><span class="hs-identifier hs-var">pname</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-236"></span><span>                          </span><span class="annot"><span class="annottext">Maybe Name
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-237"></span><span>                </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isInternalName"><span class="hs-identifier hs-var">isInternalName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681051700"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-238"></span><span>                   </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681051684"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681051689"><span class="hs-identifier hs-var">mod_name</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681051681"><span class="hs-identifier hs-var">ext</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681051665"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-239"></span><span>                   </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681051684"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681051681"><span class="hs-identifier hs-var">ext</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681051665"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-240"></span><span>
</span><span id="line-241"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681051660"><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681051660"><span class="hs-identifier hs-var">fun_descr_lit</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; FCode CmmLit
</span><a href="GHC.StgToCmm.Utils.html#newStringCLit"><span class="hs-identifier hs-var">newStringCLit</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; FCode CmmLit) -&gt; String -&gt; FCode CmmLit
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; SDoc -&gt; String
</span><a href="GHC.Utils.Outputable.html#showSDocDebug"><span class="hs-identifier hs-var">showSDocDebug</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051695"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681051687"><span class="hs-identifier hs-var">ppr_for_ticky_name</span></a></span><span>
</span><span id="line-242"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681051657"><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681051657"><span class="hs-identifier hs-var">arg_descr_lit</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; FCode CmmLit
</span><a href="GHC.StgToCmm.Utils.html#newStringCLit"><span class="hs-identifier hs-var">newStringCLit</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; FCode CmmLit) -&gt; String -&gt; FCode CmmLit
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(NonVoid Id -&gt; Char) -&gt; [NonVoid Id] -&gt; String
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Char
</span><a href="GHC.StgToCmm.Ticky.html#showTypeCategory"><span class="hs-identifier hs-var">showTypeCategory</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; Char) -&gt; (NonVoid Id -&gt; Type) -&gt; NonVoid Id -&gt; Char
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">(Id -&gt; Type) -&gt; (NonVoid Id -&gt; Id) -&gt; NonVoid Id -&gt; Type
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">NonVoid Id -&gt; Id
forall a. NonVoid a -&gt; a
</span><a href="GHC.StgToCmm.Closure.html#fromNonVoid"><span class="hs-identifier hs-var">fromNonVoid</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[NonVoid Id]
</span><a href="#local-6989586621681051699"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-243"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; [CmmLit] -&gt; FCode ()
</span><a href="GHC.StgToCmm.Utils.html#emitDataLits"><span class="hs-identifier hs-var">emitDataLits</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051698"><span class="hs-identifier hs-var">ctr_lbl</span></a></span><span>
</span><span id="line-244"></span><span>        </span><span class="hs-comment">-- Must match layout of includes/rts/Ticky.h's StgEntCounter</span><span>
</span><span id="line-245"></span><span>        </span><span class="hs-comment">--</span><span>
</span><span id="line-246"></span><span>        </span><span class="hs-comment">-- krc: note that all the fields are I32 now; some were I16</span><span>
</span><span id="line-247"></span><span>        </span><span class="hs-comment">-- before, but the code generator wasn't handling that</span><span>
</span><span id="line-248"></span><span>        </span><span class="hs-comment">-- properly and it led to chaos, panic and disorder.</span><span>
</span><span id="line-249"></span><span>            </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#mkIntCLit"><span class="hs-identifier hs-var">mkIntCLit</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051693"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span>               </span><span class="hs-comment">-- registered?</span><span>
</span><span id="line-250"></span><span>              </span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#mkIntCLit"><span class="hs-identifier hs-var">mkIntCLit</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051693"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[NonVoid Id] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[NonVoid Id]
</span><a href="#local-6989586621681051699"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>   </span><span class="hs-comment">-- Arity</span><span>
</span><span id="line-251"></span><span>              </span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#mkIntCLit"><span class="hs-identifier hs-var">mkIntCLit</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051693"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span>               </span><span class="hs-comment">-- Heap allocated for this thing</span><span>
</span><span id="line-252"></span><span>              </span><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681051660"><span class="hs-identifier hs-var">fun_descr_lit</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-253"></span><span>              </span><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681051657"><span class="hs-identifier hs-var">arg_descr_lit</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-254"></span><span>              </span><span class="annot"><span class="annottext">Platform -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#zeroCLit"><span class="hs-identifier hs-var">zeroCLit</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051693"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">,</span><span>          </span><span class="hs-comment">-- Entries into this thing</span><span>
</span><span id="line-255"></span><span>              </span><span class="annot"><span class="annottext">Platform -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#zeroCLit"><span class="hs-identifier hs-var">zeroCLit</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051693"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">,</span><span>          </span><span class="hs-comment">-- Heap allocated by this thing</span><span>
</span><span id="line-256"></span><span>              </span><span class="annot"><span class="annottext">Platform -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#zeroCLit"><span class="hs-identifier hs-var">zeroCLit</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051693"><span class="hs-identifier hs-var">platform</span></a></span><span>           </span><span class="hs-comment">-- Link to next StgEntCounter</span><span>
</span><span id="line-257"></span><span>            </span><span class="hs-special">]</span><span>
</span><span id="line-258"></span><span>        </span><span class="hs-special">}</span><span>
</span><span id="line-259"></span><span>
</span><span id="line-260"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-261"></span><span class="hs-comment">-- Ticky stack frames</span><span>
</span><span id="line-262"></span><span>
</span><span id="line-263"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyPushUpdateFrame"><span class="hs-identifier hs-type">tickyPushUpdateFrame</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyUpdateFrameOmitted"><span class="hs-identifier hs-type">tickyUpdateFrameOmitted</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-264"></span><span id="tickyPushUpdateFrame"><span class="annot"><span class="annottext">tickyPushUpdateFrame :: FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyPushUpdateFrame"><span class="hs-identifier hs-var hs-var">tickyPushUpdateFrame</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UPDF_PUSHED_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-265"></span><span id="tickyUpdateFrameOmitted"><span class="annot"><span class="annottext">tickyUpdateFrameOmitted :: FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyUpdateFrameOmitted"><span class="hs-identifier hs-var hs-var">tickyUpdateFrameOmitted</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UPDF_OMITTED_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-266"></span><span>
</span><span id="line-267"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-268"></span><span class="hs-comment">-- Ticky entries</span><span>
</span><span id="line-269"></span><span>
</span><span id="line-270"></span><span class="hs-comment">-- NB the name-specific entries are only available for names that have</span><span>
</span><span id="line-271"></span><span class="hs-comment">-- dedicated Cmm code. As far as I know, this just rules out</span><span>
</span><span id="line-272"></span><span class="hs-comment">-- constructor thunks. For them, there is no CMM code block to put the</span><span>
</span><span id="line-273"></span><span class="hs-comment">-- bump of name-specific ticky counter into. On the other hand, we can</span><span>
</span><span id="line-274"></span><span class="hs-comment">-- still track allocation their allocation.</span><span>
</span><span id="line-275"></span><span>
</span><span id="line-276"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyEnterDynCon"><span class="hs-identifier hs-type">tickyEnterDynCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-277"></span><span id="tickyEnterDynCon"><span class="annot"><span class="annottext">tickyEnterDynCon :: FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyEnterDynCon"><span class="hs-identifier hs-var hs-var">tickyEnterDynCon</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ENT_DYN_CON_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-278"></span><span>
</span><span id="line-279"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyEnterThunk"><span class="hs-identifier hs-type">tickyEnterThunk</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-280"></span><span id="tickyEnterThunk"><span class="annot"><span class="annottext">tickyEnterThunk :: ClosureInfo -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyEnterThunk"><span class="hs-identifier hs-var hs-var">tickyEnterThunk</span></a></span></span><span> </span><span id="local-6989586621681051646"><span class="annot"><span class="annottext">ClosureInfo
</span><a href="#local-6989586621681051646"><span class="hs-identifier hs-var">cl_info</span></a></span></span><span>
</span><span id="line-281"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-282"></span><span>    </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681051645"><span class="hs-identifier hs-var">ctr</span></a></span><span>
</span><span id="line-283"></span><span>    </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681051644"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051644"><span class="hs-identifier hs-var">has_ctr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; FCode Bool
</span><a href="GHC.StgToCmm.Ticky.html#thunkHasCounter"><span class="hs-identifier hs-var">thunkHasCounter</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051643"><span class="hs-identifier hs-var">static</span></a></span><span>
</span><span id="line-284"></span><span>    </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; FCode () -&gt; FCode ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051644"><span class="hs-identifier hs-var">has_ctr</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-285"></span><span>      </span><span id="local-6989586621681051642"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051642"><span class="hs-identifier hs-var">ticky_ctr_lbl</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode CLabel
</span><a href="GHC.StgToCmm.Monad.html#getTickyCtrLabel"><span class="hs-identifier hs-var">getTickyCtrLabel</span></a></span><span>
</span><span id="line-286"></span><span>      </span><span class="annot"><span class="annottext">CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#registerTickyCtrAtEntryDyn"><span class="hs-identifier hs-var">registerTickyCtrAtEntryDyn</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051642"><span class="hs-identifier hs-var">ticky_ctr_lbl</span></a></span><span>
</span><span id="line-287"></span><span>      </span><span class="annot"><span class="annottext">CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyEntryCount"><span class="hs-identifier hs-var">bumpTickyEntryCount</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051642"><span class="hs-identifier hs-var">ticky_ctr_lbl</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-288"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-289"></span><span>    </span><span id="local-6989586621681051639"><span class="annot"><span class="annottext">updatable :: Bool
</span><a href="#local-6989586621681051639"><span class="hs-identifier hs-var hs-var">updatable</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ClosureInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#closureUpdReqd"><span class="hs-identifier hs-var">closureUpdReqd</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureInfo
</span><a href="#local-6989586621681051646"><span class="hs-identifier hs-var">cl_info</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-290"></span><span>    </span><span id="local-6989586621681051643"><span class="annot"><span class="annottext">static :: Bool
</span><a href="#local-6989586621681051643"><span class="hs-identifier hs-var hs-var">static</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ClosureInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#isStaticClosure"><span class="hs-identifier hs-var">isStaticClosure</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureInfo
</span><a href="#local-6989586621681051646"><span class="hs-identifier hs-var">cl_info</span></a></span><span>
</span><span id="line-291"></span><span>
</span><span id="line-292"></span><span>    </span><span id="local-6989586621681051645"><span class="annot"><span class="annottext">ctr :: FastString
</span><a href="#local-6989586621681051645"><span class="hs-identifier hs-var hs-var">ctr</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051643"><span class="hs-identifier hs-var">static</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051639"><span class="hs-identifier hs-var">updatable</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ENT_STATIC_THK_SINGLE_ctr&quot;</span></span><span>
</span><span id="line-293"></span><span>                                   </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ENT_STATIC_THK_MANY_ctr&quot;</span></span><span>
</span><span id="line-294"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051639"><span class="hs-identifier hs-var">updatable</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ENT_DYN_THK_SINGLE_ctr&quot;</span></span><span>
</span><span id="line-295"></span><span>                                   </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ENT_DYN_THK_MANY_ctr&quot;</span></span><span>
</span><span id="line-296"></span><span>
</span><span id="line-297"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyUpdateBhCaf"><span class="hs-identifier hs-type">tickyUpdateBhCaf</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-298"></span><span id="tickyUpdateBhCaf"><span class="annot"><span class="annottext">tickyUpdateBhCaf :: ClosureInfo -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyUpdateBhCaf"><span class="hs-identifier hs-var hs-var">tickyUpdateBhCaf</span></a></span></span><span> </span><span id="local-6989586621681051636"><span class="annot"><span class="annottext">ClosureInfo
</span><a href="#local-6989586621681051636"><span class="hs-identifier hs-var">cl_info</span></a></span></span><span>
</span><span id="line-299"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681051635"><span class="hs-identifier hs-var">ctr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-300"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-301"></span><span>    </span><span id="local-6989586621681051635"><span class="annot"><span class="annottext">ctr :: FastString
</span><a href="#local-6989586621681051635"><span class="hs-identifier hs-var hs-var">ctr</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">ClosureInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#closureUpdReqd"><span class="hs-identifier hs-var">closureUpdReqd</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureInfo
</span><a href="#local-6989586621681051636"><span class="hs-identifier hs-var">cl_info</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UPD_CAF_BH_SINGLE_ENTRY_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-302"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UPD_CAF_BH_UPDATABLE_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-303"></span><span>
</span><span id="line-304"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyEnterFun"><span class="hs-identifier hs-type">tickyEnterFun</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Closure.html#ClosureInfo"><span class="hs-identifier hs-type">ClosureInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-305"></span><span id="tickyEnterFun"><span class="annot"><span class="annottext">tickyEnterFun :: ClosureInfo -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyEnterFun"><span class="hs-identifier hs-var hs-var">tickyEnterFun</span></a></span></span><span> </span><span id="local-6989586621681051634"><span class="annot"><span class="annottext">ClosureInfo
</span><a href="#local-6989586621681051634"><span class="hs-identifier hs-var">cl_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-306"></span><span>  </span><span id="local-6989586621681051633"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051633"><span class="hs-identifier hs-var">ctr_lbl</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode CLabel
</span><a href="GHC.StgToCmm.Monad.html#getTickyCtrLabel"><span class="hs-identifier hs-var">getTickyCtrLabel</span></a></span><span>
</span><span id="line-307"></span><span>
</span><span id="line-308"></span><span>  </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">ClosureInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#isStaticClosure"><span class="hs-identifier hs-var">isStaticClosure</span></a></span><span> </span><span class="annot"><span class="annottext">ClosureInfo
</span><a href="#local-6989586621681051634"><span class="hs-identifier hs-var">cl_info</span></a></span><span>
</span><span id="line-309"></span><span>    </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ENT_STATIC_FUN_DIRECT_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-310"></span><span>            </span><span class="annot"><span class="annottext">CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#registerTickyCtr"><span class="hs-identifier hs-var">registerTickyCtr</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051633"><span class="hs-identifier hs-var">ctr_lbl</span></a></span><span>
</span><span id="line-311"></span><span>    </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ENT_DYN_FUN_DIRECT_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-312"></span><span>            </span><span class="annot"><span class="annottext">CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#registerTickyCtrAtEntryDyn"><span class="hs-identifier hs-var">registerTickyCtrAtEntryDyn</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051633"><span class="hs-identifier hs-var">ctr_lbl</span></a></span><span>
</span><span id="line-313"></span><span>
</span><span id="line-314"></span><span>  </span><span class="annot"><span class="annottext">CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyEntryCount"><span class="hs-identifier hs-var">bumpTickyEntryCount</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051633"><span class="hs-identifier hs-var">ctr_lbl</span></a></span><span>
</span><span id="line-315"></span><span>
</span><span id="line-316"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyEnterLNE"><span class="hs-identifier hs-type">tickyEnterLNE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-317"></span><span id="tickyEnterLNE"><span class="annot"><span class="annottext">tickyEnterLNE :: FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyEnterLNE"><span class="hs-identifier hs-var hs-var">tickyEnterLNE</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-318"></span><span>  </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ENT_LNE_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-319"></span><span>  </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTickyLNE"><span class="hs-identifier hs-var">ifTickyLNE</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-320"></span><span>    </span><span id="local-6989586621681051630"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051630"><span class="hs-identifier hs-var">ctr_lbl</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode CLabel
</span><a href="GHC.StgToCmm.Monad.html#getTickyCtrLabel"><span class="hs-identifier hs-var">getTickyCtrLabel</span></a></span><span>
</span><span id="line-321"></span><span>    </span><span class="annot"><span class="annottext">CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#registerTickyCtr"><span class="hs-identifier hs-var">registerTickyCtr</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051630"><span class="hs-identifier hs-var">ctr_lbl</span></a></span><span>
</span><span id="line-322"></span><span>    </span><span class="annot"><span class="annottext">CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyEntryCount"><span class="hs-identifier hs-var">bumpTickyEntryCount</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051630"><span class="hs-identifier hs-var">ctr_lbl</span></a></span><span>
</span><span id="line-323"></span><span>
</span><span id="line-324"></span><span class="hs-comment">-- needn't register a counter upon entry if</span><span>
</span><span id="line-325"></span><span class="hs-comment">--</span><span>
</span><span id="line-326"></span><span class="hs-comment">-- 1) it's for a dynamic closure, and</span><span>
</span><span id="line-327"></span><span class="hs-comment">--</span><span>
</span><span id="line-328"></span><span class="hs-comment">-- 2) -ticky-allocd is on</span><span>
</span><span id="line-329"></span><span class="hs-comment">--</span><span>
</span><span id="line-330"></span><span class="hs-comment">-- since the counter was registered already upon being alloc'd</span><span>
</span><span id="line-331"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#registerTickyCtrAtEntryDyn"><span class="hs-identifier hs-type">registerTickyCtrAtEntryDyn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-332"></span><span id="registerTickyCtrAtEntryDyn"><span class="annot"><span class="annottext">registerTickyCtrAtEntryDyn :: CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#registerTickyCtrAtEntryDyn"><span class="hs-identifier hs-var hs-var">registerTickyCtrAtEntryDyn</span></a></span></span><span> </span><span id="local-6989586621681051629"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051629"><span class="hs-identifier hs-var">ctr_lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-333"></span><span>  </span><span id="local-6989586621681051628"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051628"><span class="hs-identifier hs-var">already_registered</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode Bool
</span><a href="GHC.StgToCmm.Ticky.html#tickyAllocdIsOn"><span class="hs-identifier hs-var">tickyAllocdIsOn</span></a></span><span>
</span><span id="line-334"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; FCode () -&gt; FCode ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051628"><span class="hs-identifier hs-var">already_registered</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#registerTickyCtr"><span class="hs-identifier hs-var">registerTickyCtr</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051629"><span class="hs-identifier hs-var">ctr_lbl</span></a></span><span>
</span><span id="line-335"></span><span>
</span><span id="line-336"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#registerTickyCtr"><span class="hs-identifier hs-type">registerTickyCtr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-337"></span><span class="hs-comment">-- Register a ticky counter</span><span>
</span><span id="line-338"></span><span class="hs-comment">--   if ( ! f_ct.registeredp ) {</span><span>
</span><span id="line-339"></span><span class="hs-comment">--          f_ct.link = ticky_entry_ctrs;       /* hook this one onto the front of the list */</span><span>
</span><span id="line-340"></span><span class="hs-comment">--          ticky_entry_ctrs = &amp; (f_ct);        /* mark it as &quot;registered&quot; */</span><span>
</span><span id="line-341"></span><span class="hs-comment">--          f_ct.registeredp = 1 }</span><span>
</span><span id="line-342"></span><span id="registerTickyCtr"><span class="annot"><span class="annottext">registerTickyCtr :: CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#registerTickyCtr"><span class="hs-identifier hs-var hs-var">registerTickyCtr</span></a></span></span><span> </span><span id="local-6989586621681051626"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051626"><span class="hs-identifier hs-var">ctr_lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-343"></span><span>  </span><span id="local-6989586621681051625"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051625"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-344"></span><span>  </span><span id="local-6989586621681051624"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051624"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode Platform
</span><a href="GHC.StgToCmm.Monad.html#getPlatform"><span class="hs-identifier hs-var">getPlatform</span></a></span><span>
</span><span id="line-345"></span><span>  </span><span class="hs-keyword">let</span><span>
</span><span id="line-346"></span><span>    </span><span class="hs-comment">-- krc: code generator doesn't handle Not, so we test for Eq 0 instead</span><span>
</span><span id="line-347"></span><span>    </span><span id="local-6989586621681051623"><span class="annot"><span class="annottext">test :: CmmExpr
</span><a href="#local-6989586621681051623"><span class="hs-identifier hs-var hs-var">test</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-var">CmmMachOp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_Eq"><span class="hs-identifier hs-var">MO_Eq</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051624"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-348"></span><span>              </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmType -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLoad"><span class="hs-identifier hs-var">CmmLoad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#cmmLabelOffB"><span class="hs-identifier hs-var">cmmLabelOffB</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051626"><span class="hs-identifier hs-var">ctr_lbl</span></a></span><span>
</span><span id="line-349"></span><span>                                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#oFFSET_StgEntCounter_registeredp"><span class="hs-identifier hs-var">oFFSET_StgEntCounter_registeredp</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051625"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; CmmType
</span><a href="GHC.Cmm.Type.html#bWord"><span class="hs-identifier hs-var">bWord</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051624"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-350"></span><span>               </span><span class="annot"><span class="annottext">Platform -&gt; CmmExpr
</span><a href="GHC.Cmm.Utils.html#zeroExpr"><span class="hs-identifier hs-var">zeroExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051624"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-351"></span><span>    </span><span id="local-6989586621681051613"><span class="annot"><span class="annottext">register_stmts :: [CmmAGraph]
</span><a href="#local-6989586621681051613"><span class="hs-identifier hs-var hs-var">register_stmts</span></a></span></span><span>
</span><span id="line-352"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr -&gt; CmmAGraph
</span><a href="GHC.Cmm.Graph.html#mkStore"><span class="hs-identifier hs-var">mkStore</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#cmmLabelOffB"><span class="hs-identifier hs-var">cmmLabelOffB</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051626"><span class="hs-identifier hs-var">ctr_lbl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#oFFSET_StgEntCounter_link"><span class="hs-identifier hs-var">oFFSET_StgEntCounter_link</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051625"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-353"></span><span>                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmType -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLoad"><span class="hs-identifier hs-var">CmmLoad</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051610"><span class="hs-identifier hs-var">ticky_entry_ctrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; CmmType
</span><a href="GHC.Cmm.Type.html#bWord"><span class="hs-identifier hs-var">bWord</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051624"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-354"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr -&gt; CmmAGraph
</span><a href="GHC.Cmm.Graph.html#mkStore"><span class="hs-identifier hs-var">mkStore</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051610"><span class="hs-identifier hs-var">ticky_entry_ctrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; CmmExpr
</span><a href="GHC.Cmm.Utils.html#mkLblExpr"><span class="hs-identifier hs-var">mkLblExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051626"><span class="hs-identifier hs-var">ctr_lbl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-355"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr -&gt; CmmAGraph
</span><a href="GHC.Cmm.Graph.html#mkStore"><span class="hs-identifier hs-var">mkStore</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#cmmLabelOffB"><span class="hs-identifier hs-var">cmmLabelOffB</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051626"><span class="hs-identifier hs-var">ctr_lbl</span></a></span><span>
</span><span id="line-356"></span><span>                                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#oFFSET_StgEntCounter_registeredp"><span class="hs-identifier hs-var">oFFSET_StgEntCounter_registeredp</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051625"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-357"></span><span>                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; CmmExpr
</span><a href="GHC.Cmm.Utils.html#mkIntExpr"><span class="hs-identifier hs-var">mkIntExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051624"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-358"></span><span>    </span><span id="local-6989586621681051610"><span class="annot"><span class="annottext">ticky_entry_ctrs :: CmmExpr
</span><a href="#local-6989586621681051610"><span class="hs-identifier hs-var hs-var">ticky_entry_ctrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; CmmExpr
</span><a href="GHC.Cmm.Utils.html#mkLblExpr"><span class="hs-identifier hs-var">mkLblExpr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkRtsCmmDataLabel"><span class="hs-identifier hs-var">mkRtsCmmDataLabel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ticky_entry_ctrs&quot;</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-359"></span><span>  </span><span class="annot"><span class="annottext">CmmAGraph -&gt; FCode ()
</span><a href="GHC.StgToCmm.Monad.html#emit"><span class="hs-identifier hs-var">emit</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmAGraph -&gt; FCode ()) -&gt; FCode CmmAGraph -&gt; FCode ()
forall (m :: * -&gt; *) a b. Monad m =&gt; (a -&gt; m b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3D%3C%3C"><span class="hs-operator hs-var">=&lt;&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmAGraph -&gt; FCode CmmAGraph
</span><a href="GHC.StgToCmm.Monad.html#mkCmmIfThen"><span class="hs-identifier hs-var">mkCmmIfThen</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051623"><span class="hs-identifier hs-var">test</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[CmmAGraph] -&gt; CmmAGraph
</span><a href="GHC.Cmm.Graph.html#catAGraphs"><span class="hs-identifier hs-var">catAGraphs</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmAGraph]
</span><a href="#local-6989586621681051613"><span class="hs-identifier hs-var">register_stmts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-360"></span><span>
</span><span id="line-361"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyReturnOldCon"><span class="hs-identifier hs-type">tickyReturnOldCon</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyReturnNewCon"><span class="hs-identifier hs-type">tickyReturnNewCon</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#RepArity"><span class="hs-identifier hs-type">RepArity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-362"></span><span id="tickyReturnOldCon"><span class="annot"><span class="annottext">tickyReturnOldCon :: Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyReturnOldCon"><span class="hs-identifier hs-var hs-var">tickyReturnOldCon</span></a></span></span><span> </span><span id="local-6989586621681051601"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051601"><span class="hs-identifier hs-var">arity</span></a></span></span><span>
</span><span id="line-363"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RET_OLD_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-364"></span><span>                 </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpHistogram"><span class="hs-identifier hs-var">bumpHistogram</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RET_OLD_hst&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051601"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-365"></span><span id="tickyReturnNewCon"><span class="annot"><span class="annottext">tickyReturnNewCon :: Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyReturnNewCon"><span class="hs-identifier hs-var hs-var">tickyReturnNewCon</span></a></span></span><span> </span><span id="local-6989586621681051599"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051599"><span class="hs-identifier hs-var">arity</span></a></span></span><span>
</span><span id="line-366"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RET_NEW_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-367"></span><span>                 </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpHistogram"><span class="hs-identifier hs-var">bumpHistogram</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RET_NEW_hst&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051599"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-368"></span><span>
</span><span id="line-369"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyUnboxedTupleReturn"><span class="hs-identifier hs-type">tickyUnboxedTupleReturn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#RepArity"><span class="hs-identifier hs-type">RepArity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-370"></span><span id="tickyUnboxedTupleReturn"><span class="annot"><span class="annottext">tickyUnboxedTupleReturn :: Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyUnboxedTupleReturn"><span class="hs-identifier hs-var hs-var">tickyUnboxedTupleReturn</span></a></span></span><span> </span><span id="local-6989586621681051598"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051598"><span class="hs-identifier hs-var">arity</span></a></span></span><span>
</span><span id="line-371"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RET_UNBOXED_TUP_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-372"></span><span>                 </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpHistogram"><span class="hs-identifier hs-var">bumpHistogram</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RET_UNBOXED_TUP_hst&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051598"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-373"></span><span>
</span><span id="line-374"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-375"></span><span class="hs-comment">-- Ticky calls</span><span>
</span><span id="line-376"></span><span>
</span><span id="line-377"></span><span class="hs-comment">-- Ticks at a *call site*:</span><span>
</span><span id="line-378"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyDirectCall"><span class="hs-identifier hs-type">tickyDirectCall</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#RepArity"><span class="hs-identifier hs-type">RepArity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgArg"><span class="hs-identifier hs-type">StgArg</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-379"></span><span id="tickyDirectCall"><span class="annot"><span class="annottext">tickyDirectCall :: Int -&gt; [StgArg] -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyDirectCall"><span class="hs-identifier hs-var hs-var">tickyDirectCall</span></a></span></span><span> </span><span id="local-6989586621681051597"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051597"><span class="hs-identifier hs-var">arity</span></a></span></span><span> </span><span id="local-6989586621681051596"><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621681051596"><span class="hs-identifier hs-var">args</span></a></span></span><span>
</span><span id="line-380"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621681051596"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[StgArg] -&gt; Int -&gt; Bool
forall a. [a] -&gt; Int -&gt; Bool
</span><a href="GHC.Utils.Misc.html#lengthIs"><span class="hs-operator hs-var">`lengthIs`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051597"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyKnownCallExact"><span class="hs-identifier hs-var">tickyKnownCallExact</span></a></span><span>
</span><span id="line-381"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyKnownCallExtraArgs"><span class="hs-identifier hs-var">tickyKnownCallExtraArgs</span></a></span><span>
</span><span id="line-382"></span><span>                   </span><span class="annot"><span class="annottext">[PrimRep] -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickySlowCallPat"><span class="hs-identifier hs-var">tickySlowCallPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(StgArg -&gt; PrimRep) -&gt; [StgArg] -&gt; [PrimRep]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">StgArg -&gt; PrimRep
</span><a href="GHC.StgToCmm.Closure.html#argPrimRep"><span class="hs-identifier hs-var">argPrimRep</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; [StgArg] -&gt; [StgArg]
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051597"><span class="hs-identifier hs-var">arity</span></a></span><span> </span><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621681051596"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-383"></span><span>
</span><span id="line-384"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyKnownCallTooFewArgs"><span class="hs-identifier hs-type">tickyKnownCallTooFewArgs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-385"></span><span id="tickyKnownCallTooFewArgs"><span class="annot"><span class="annottext">tickyKnownCallTooFewArgs :: FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyKnownCallTooFewArgs"><span class="hs-identifier hs-var hs-var">tickyKnownCallTooFewArgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;KNOWN_CALL_TOO_FEW_ARGS_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-386"></span><span>
</span><span id="line-387"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyKnownCallExact"><span class="hs-identifier hs-type">tickyKnownCallExact</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-388"></span><span id="tickyKnownCallExact"><span class="annot"><span class="annottext">tickyKnownCallExact :: FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyKnownCallExact"><span class="hs-identifier hs-var hs-var">tickyKnownCallExact</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;KNOWN_CALL_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-389"></span><span>
</span><span id="line-390"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyKnownCallExtraArgs"><span class="hs-identifier hs-type">tickyKnownCallExtraArgs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-391"></span><span id="tickyKnownCallExtraArgs"><span class="annot"><span class="annottext">tickyKnownCallExtraArgs :: FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyKnownCallExtraArgs"><span class="hs-identifier hs-var hs-var">tickyKnownCallExtraArgs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;KNOWN_CALL_EXTRA_ARGS_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-392"></span><span>
</span><span id="line-393"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyUnknownCall"><span class="hs-identifier hs-type">tickyUnknownCall</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-394"></span><span id="tickyUnknownCall"><span class="annot"><span class="annottext">tickyUnknownCall :: FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyUnknownCall"><span class="hs-identifier hs-var hs-var">tickyUnknownCall</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;UNKNOWN_CALL_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-395"></span><span>
</span><span id="line-396"></span><span class="hs-comment">-- Tick for the call pattern at slow call site (i.e. in addition to</span><span>
</span><span id="line-397"></span><span class="hs-comment">-- tickyUnknownCall, tickyKnownCallExtraArgs, etc.)</span><span>
</span><span id="line-398"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickySlowCall"><span class="hs-identifier hs-type">tickySlowCall</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Stg.Syntax.html#StgArg"><span class="hs-identifier hs-type">StgArg</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-399"></span><span id="tickySlowCall"><span class="annot"><span class="annottext">tickySlowCall :: LambdaFormInfo -&gt; [StgArg] -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickySlowCall"><span class="hs-identifier hs-var hs-var">tickySlowCall</span></a></span></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; FCode ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-400"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickySlowCall"><span class="hs-identifier hs-var">tickySlowCall</span></a></span><span> </span><span id="local-6989586621681051587"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681051587"><span class="hs-identifier hs-var">lf_info</span></a></span></span><span> </span><span id="local-6989586621681051586"><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621681051586"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-401"></span><span> </span><span class="hs-comment">-- see Note [Ticky for slow calls]</span><span>
</span><span id="line-402"></span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#isKnownFun"><span class="hs-identifier hs-var">isKnownFun</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681051587"><span class="hs-identifier hs-var">lf_info</span></a></span><span>
</span><span id="line-403"></span><span>   </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyKnownCallTooFewArgs"><span class="hs-identifier hs-var">tickyKnownCallTooFewArgs</span></a></span><span>
</span><span id="line-404"></span><span>   </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyUnknownCall"><span class="hs-identifier hs-var">tickyUnknownCall</span></a></span><span>
</span><span id="line-405"></span><span> </span><span class="annot"><span class="annottext">[PrimRep] -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickySlowCallPat"><span class="hs-identifier hs-var">tickySlowCallPat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(StgArg -&gt; PrimRep) -&gt; [StgArg] -&gt; [PrimRep]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">StgArg -&gt; PrimRep
</span><a href="GHC.StgToCmm.Closure.html#argPrimRep"><span class="hs-identifier hs-var">argPrimRep</span></a></span><span> </span><span class="annot"><span class="annottext">[StgArg]
</span><a href="#local-6989586621681051586"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-406"></span><span>
</span><span id="line-407"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickySlowCallPat"><span class="hs-identifier hs-type">tickySlowCallPat</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCon.html#PrimRep"><span class="hs-identifier hs-type">PrimRep</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-408"></span><span id="tickySlowCallPat"><span class="annot"><span class="annottext">tickySlowCallPat :: [PrimRep] -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickySlowCallPat"><span class="hs-identifier hs-var hs-var">tickySlowCallPat</span></a></span></span><span> </span><span id="local-6989586621681051584"><span class="annot"><span class="annottext">[PrimRep]
</span><a href="#local-6989586621681051584"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-409"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681051583"><span class="annot"><span class="annottext">argReps :: [ArgRep]
</span><a href="#local-6989586621681051583"><span class="hs-identifier hs-var hs-var">argReps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(PrimRep -&gt; ArgRep) -&gt; [PrimRep] -&gt; [ArgRep]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">PrimRep -&gt; ArgRep
</span><a href="GHC.StgToCmm.ArgRep.html#toArgRep"><span class="hs-identifier hs-var">toArgRep</span></a></span><span> </span><span class="annot"><span class="annottext">[PrimRep]
</span><a href="#local-6989586621681051584"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-410"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681051582"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051582"><span class="hs-identifier hs-var">n_matched</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ArgRep] -&gt; (FastString, Int)
</span><a href="GHC.StgToCmm.ArgRep.html#slowCallPattern"><span class="hs-identifier hs-var">slowCallPattern</span></a></span><span> </span><span class="annot"><span class="annottext">[ArgRep]
</span><a href="#local-6989586621681051583"><span class="hs-identifier hs-var">argReps</span></a></span><span>
</span><span id="line-411"></span><span>  </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051582"><span class="hs-identifier hs-var">n_matched</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[PrimRep]
</span><a href="#local-6989586621681051584"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[PrimRep] -&gt; Int -&gt; Bool
forall a. [a] -&gt; Int -&gt; Bool
</span><a href="GHC.Utils.Misc.html#lengthIs"><span class="hs-operator hs-var">`lengthIs`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051582"><span class="hs-identifier hs-var">n_matched</span></a></span><span>
</span><span id="line-412"></span><span>     </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLbl"><span class="hs-identifier hs-var">bumpTickyLbl</span></a></span><span> </span><span class="annot"><span class="annottext">(CLabel -&gt; FCode ()) -&gt; CLabel -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkRtsSlowFastTickyCtrLabel"><span class="hs-identifier hs-var">mkRtsSlowFastTickyCtrLabel</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; CLabel) -&gt; String -&gt; CLabel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(ArgRep -&gt; String) -&gt; [ArgRep] -&gt; String
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Char -&gt; Char) -&gt; String -&gt; String
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char
</span><a href="../../base/src/GHC.Unicode.html#toLower"><span class="hs-identifier hs-var">Data.Char.toLower</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; String) -&gt; (ArgRep -&gt; String) -&gt; ArgRep -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ArgRep -&gt; String
</span><a href="GHC.StgToCmm.ArgRep.html#argRepString"><span class="hs-identifier hs-var">argRepString</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[ArgRep]
</span><a href="#local-6989586621681051583"><span class="hs-identifier hs-var">argReps</span></a></span><span>
</span><span id="line-413"></span><span>     </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="annot"><span class="annottext">(FastString -&gt; FCode ()) -&gt; FastString -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;VERY_SLOW_CALL_ctr&quot;</span></span><span>
</span><span id="line-414"></span><span>
</span><span id="line-415"></span><span class="hs-comment">{-

Note [Ticky for slow calls]
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Terminology is unfortunately a bit mixed up for these calls. codeGen
uses &quot;slow call&quot; to refer to unknown calls and under-saturated known
calls.

Nowadays, though (ie as of the eval/apply paper), the significantly
slower calls are actually just a subset of these: the ones with no
built-in argument pattern (cf GHC.StgToCmm.ArgRep.slowCallPattern)

So for ticky profiling, we split slow calls into
&quot;SLOW_CALL_fast_&lt;pattern&gt;_ctr&quot; (those matching a built-in pattern) and
VERY_SLOW_CALL_ctr (those without a built-in pattern; these are very
bad for both space and time).

-}</span><span>
</span><span id="line-433"></span><span>
</span><span id="line-434"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-435"></span><span class="hs-comment">-- Ticky allocation</span><span>
</span><span id="line-436"></span><span>
</span><span id="line-437"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyDynAlloc"><span class="hs-identifier hs-type">tickyDynAlloc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Runtime.Heap.Layout.html#SMRep"><span class="hs-identifier hs-type">SMRep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#LambdaFormInfo"><span class="hs-identifier hs-type">LambdaFormInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-438"></span><span class="hs-comment">-- Called when doing a dynamic heap allocation; the LambdaFormInfo</span><span>
</span><span id="line-439"></span><span class="hs-comment">-- used to distinguish between closure types</span><span>
</span><span id="line-440"></span><span class="hs-comment">--</span><span>
</span><span id="line-441"></span><span class="hs-comment">-- TODO what else to count while we're here?</span><span>
</span><span id="line-442"></span><span id="tickyDynAlloc"><span class="annot"><span class="annottext">tickyDynAlloc :: Maybe Id -&gt; SMRep -&gt; LambdaFormInfo -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyDynAlloc"><span class="hs-identifier hs-var hs-var">tickyDynAlloc</span></a></span></span><span> </span><span id="local-6989586621681051576"><span class="annot"><span class="annottext">Maybe Id
</span><a href="#local-6989586621681051576"><span class="hs-identifier hs-var">mb_id</span></a></span></span><span> </span><span id="local-6989586621681051575"><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621681051575"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span id="local-6989586621681051574"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681051574"><span class="hs-identifier hs-var">lf</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-443"></span><span>  </span><span id="local-6989586621681051573"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051573"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-444"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681051572"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681051572"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051573"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-445"></span><span>      </span><span id="local-6989586621681051569"><span class="annot"><span class="annottext">bytes :: Int
</span><a href="#local-6989586621681051569"><span class="hs-identifier hs-var hs-var">bytes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSizeInBytes"><span class="hs-identifier hs-var">platformWordSizeInBytes</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051572"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; SMRep -&gt; Int
</span><a href="GHC.Runtime.Heap.Layout.html#heapClosureSizeW"><span class="hs-identifier hs-var">heapClosureSizeW</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051573"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621681051575"><span class="hs-identifier hs-var">rep</span></a></span><span>
</span><span id="line-446"></span><span>
</span><span id="line-447"></span><span>      </span><span id="local-6989586621681051564"><span class="annot"><span class="annottext">countGlobal :: FastString -&gt; FastString -&gt; FCode ()
</span><a href="#local-6989586621681051564"><span class="hs-identifier hs-var hs-var">countGlobal</span></a></span></span><span> </span><span id="local-6989586621681051563"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681051563"><span class="hs-identifier hs-var">tot</span></a></span></span><span> </span><span id="local-6989586621681051562"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681051562"><span class="hs-identifier hs-var">ctr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-448"></span><span>        </span><span class="annot"><span class="annottext">FastString -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounterBy"><span class="hs-identifier hs-var">bumpTickyCounterBy</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681051563"><span class="hs-identifier hs-var">tot</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051569"><span class="hs-identifier hs-var">bytes</span></a></span><span>
</span><span id="line-449"></span><span>        </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span>   </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681051562"><span class="hs-identifier hs-var">ctr</span></a></span><span>
</span><span id="line-450"></span><span>      </span><span id="local-6989586621681051558"><span class="annot"><span class="annottext">countSpecific :: FCode ()
</span><a href="#local-6989586621681051558"><span class="hs-identifier hs-var hs-var">countSpecific</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTickyAllocd"><span class="hs-identifier hs-var">ifTickyAllocd</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Id
</span><a href="#local-6989586621681051576"><span class="hs-identifier hs-var">mb_id</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-451"></span><span>        </span><span class="annot"><span class="annottext">Maybe Id
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; FCode ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-452"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681051556"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681051556"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-453"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681051555"><span class="annot"><span class="annottext">ctr_lbl :: CLabel
</span><a href="#local-6989586621681051555"><span class="hs-identifier hs-var hs-var">ctr_lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkRednCountsLabel"><span class="hs-identifier hs-var">mkRednCountsLabel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681051556"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-454"></span><span>          </span><span class="annot"><span class="annottext">CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#registerTickyCtr"><span class="hs-identifier hs-var">registerTickyCtr</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051555"><span class="hs-identifier hs-var">ctr_lbl</span></a></span><span>
</span><span id="line-455"></span><span>          </span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyAllocd"><span class="hs-identifier hs-var">bumpTickyAllocd</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051555"><span class="hs-identifier hs-var">ctr_lbl</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051569"><span class="hs-identifier hs-var">bytes</span></a></span><span>
</span><span id="line-456"></span><span>
</span><span id="line-457"></span><span>  </span><span class="hs-comment">-- TODO are we still tracking &quot;good stuff&quot; (_gds) versus</span><span>
</span><span id="line-458"></span><span>  </span><span class="hs-comment">-- administrative (_adm) versus slop (_slp)? I'm going with all _gds</span><span>
</span><span id="line-459"></span><span>  </span><span class="hs-comment">-- for now, since I don't currently know neither if we do nor how to</span><span>
</span><span id="line-460"></span><span>  </span><span class="hs-comment">-- distinguish. NSF Mar 2013</span><span>
</span><span id="line-461"></span><span>
</span><span id="line-462"></span><span>  </span><span class="hs-keyword">if</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isConRep"><span class="hs-identifier hs-var">isConRep</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621681051575"><span class="hs-identifier hs-var">rep</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-463"></span><span>         </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTickyDynThunk"><span class="hs-identifier hs-var">ifTickyDynThunk</span></a></span><span> </span><span class="annot"><span class="annottext">FCode ()
</span><a href="#local-6989586621681051558"><span class="hs-identifier hs-var">countSpecific</span></a></span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode () -&gt; FCode ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span>
</span><span id="line-464"></span><span>         </span><span class="annot"><span class="annottext">FastString -&gt; FastString -&gt; FCode ()
</span><a href="#local-6989586621681051564"><span class="hs-identifier hs-var">countGlobal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_CON_gds&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_CON_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-465"></span><span>     </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isThunkRep"><span class="hs-identifier hs-var">isThunkRep</span></a></span><span> </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621681051575"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-466"></span><span>         </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTickyDynThunk"><span class="hs-identifier hs-var">ifTickyDynThunk</span></a></span><span> </span><span class="annot"><span class="annottext">FCode ()
</span><a href="#local-6989586621681051558"><span class="hs-identifier hs-var">countSpecific</span></a></span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode () -&gt; FCode ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span>
</span><span id="line-467"></span><span>         </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo -&gt; Bool
</span><a href="GHC.StgToCmm.Closure.html#lfUpdatable"><span class="hs-identifier hs-var">lfUpdatable</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681051574"><span class="hs-identifier hs-var">lf</span></a></span><span>
</span><span id="line-468"></span><span>         </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FastString -&gt; FCode ()
</span><a href="#local-6989586621681051564"><span class="hs-identifier hs-var">countGlobal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_THK_gds&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_UP_THK_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-469"></span><span>         </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FastString -&gt; FCode ()
</span><a href="#local-6989586621681051564"><span class="hs-identifier hs-var">countGlobal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_THK_gds&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_SE_THK_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-470"></span><span>     </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">SMRep -&gt; Bool
</span><a href="GHC.Runtime.Heap.Layout.html#isFunRep"><span class="hs-identifier hs-var">isFunRep</span></a></span><span>   </span><span class="annot"><span class="annottext">SMRep
</span><a href="#local-6989586621681051575"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-471"></span><span>         </span><span class="annot"><span class="annottext">FCode ()
</span><a href="#local-6989586621681051558"><span class="hs-identifier hs-var">countSpecific</span></a></span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode () -&gt; FCode ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span>
</span><span id="line-472"></span><span>         </span><span class="annot"><span class="annottext">FastString -&gt; FastString -&gt; FCode ()
</span><a href="#local-6989586621681051564"><span class="hs-identifier hs-var">countGlobal</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_FUN_gds&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_FUN_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-473"></span><span>     </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; FCode ()
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;How is this heap object not a con, thunk, or fun?&quot;</span></span><span>
</span><span id="line-474"></span><span>
</span><span id="line-475"></span><span>
</span><span id="line-476"></span><span>
</span><span id="line-477"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyAllocHeap"><span class="hs-identifier hs-type">tickyAllocHeap</span></a></span><span> </span><span class="hs-glyph">::</span><span>
</span><span id="line-478"></span><span>  </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-comment">-- is this a genuine allocation? As opposed to</span><span>
</span><span id="line-479"></span><span>          </span><span class="hs-comment">-- GHC.StgToCmm.Layout.adjustHpBackwards</span><span>
</span><span id="line-480"></span><span>  </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#VirtualHpOffset"><span class="hs-identifier hs-type">VirtualHpOffset</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-481"></span><span class="hs-comment">-- Called when doing a heap check [TICK_ALLOC_HEAP]</span><span>
</span><span id="line-482"></span><span class="hs-comment">-- Must be lazy in the amount of allocation!</span><span>
</span><span id="line-483"></span><span id="tickyAllocHeap"><span class="annot"><span class="annottext">tickyAllocHeap :: Bool -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyAllocHeap"><span class="hs-identifier hs-var hs-var">tickyAllocHeap</span></a></span></span><span> </span><span id="local-6989586621681051546"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051546"><span class="hs-identifier hs-var">genuine</span></a></span></span><span> </span><span id="local-6989586621681051545"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051545"><span class="hs-identifier hs-var">hp</span></a></span></span><span>
</span><span id="line-484"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-485"></span><span>    </span><span class="hs-keyword">do</span><span>  </span><span class="hs-special">{</span><span> </span><span id="local-6989586621681051544"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051544"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-486"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681051543"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051543"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode Platform
</span><a href="GHC.StgToCmm.Monad.html#getPlatform"><span class="hs-identifier hs-var">getPlatform</span></a></span><span>
</span><span id="line-487"></span><span>        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621681051542"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051542"><span class="hs-identifier hs-var">ticky_ctr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode CLabel
</span><a href="GHC.StgToCmm.Monad.html#getTickyCtrLabel"><span class="hs-identifier hs-var">getTickyCtrLabel</span></a></span><span>
</span><span id="line-488"></span><span>        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">CmmAGraph -&gt; FCode ()
</span><a href="GHC.StgToCmm.Monad.html#emit"><span class="hs-identifier hs-var">emit</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmAGraph -&gt; FCode ()) -&gt; CmmAGraph -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmAGraph] -&gt; CmmAGraph
</span><a href="GHC.Cmm.Graph.html#catAGraphs"><span class="hs-identifier hs-var">catAGraphs</span></a></span><span> </span><span class="annot"><span class="annottext">([CmmAGraph] -&gt; CmmAGraph) -&gt; [CmmAGraph] -&gt; CmmAGraph
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-489"></span><span>            </span><span class="hs-comment">-- only test hp from within the emit so that the monadic</span><span>
</span><span id="line-490"></span><span>            </span><span class="hs-comment">-- computation itself is not strict in hp (cf knot in</span><span>
</span><span id="line-491"></span><span>            </span><span class="hs-comment">-- GHC.StgToCmm.Monad.getHeapUsage)</span><span>
</span><span id="line-492"></span><span>          </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051545"><span class="hs-identifier hs-var">hp</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-493"></span><span>          </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-glyph">!</span><span id="local-6989586621681051540"><span class="annot"><span class="annottext">bytes :: Int
</span><a href="#local-6989586621681051540"><span class="hs-identifier hs-var hs-var">bytes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformWordSizeInBytes"><span class="hs-identifier hs-var">platformWordSizeInBytes</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051543"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051545"><span class="hs-identifier hs-var">hp</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="hs-special">[</span><span>
</span><span id="line-494"></span><span>            </span><span class="hs-comment">-- Bump the allocation total in the closure's StgEntCounter</span><span>
</span><span id="line-495"></span><span>            </span><span class="annot"><span class="annottext">CmmType -&gt; CmmExpr -&gt; Int -&gt; CmmAGraph
</span><a href="GHC.StgToCmm.Utils.html#addToMem"><span class="hs-identifier hs-var">addToMem</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; CmmType
</span><a href="GHC.Cmm.Type.html#rEP_StgEntCounter_allocs"><span class="hs-identifier hs-var">rEP_StgEntCounter_allocs</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051544"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-496"></span><span>                     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#cmmLabelOffB"><span class="hs-identifier hs-var">cmmLabelOffB</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051542"><span class="hs-identifier hs-var">ticky_ctr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#oFFSET_StgEntCounter_allocs"><span class="hs-identifier hs-var">oFFSET_StgEntCounter_allocs</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051544"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-497"></span><span>                     </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051540"><span class="hs-identifier hs-var">bytes</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-498"></span><span>            </span><span class="hs-comment">-- Bump the global allocation total ALLOC_HEAP_tot</span><span>
</span><span id="line-499"></span><span>            </span><span class="annot"><span class="annottext">CmmType -&gt; CLabel -&gt; Int -&gt; CmmAGraph
</span><a href="GHC.StgToCmm.Utils.html#addToMemLbl"><span class="hs-identifier hs-var">addToMemLbl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; CmmType
</span><a href="GHC.Cmm.Type.html#bWord"><span class="hs-identifier hs-var">bWord</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051543"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-500"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkRtsCmmDataLabel"><span class="hs-identifier hs-var">mkRtsCmmDataLabel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_HEAP_tot&quot;</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-501"></span><span>                        </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051540"><span class="hs-identifier hs-var">bytes</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-502"></span><span>            </span><span class="hs-comment">-- Bump the global allocation counter ALLOC_HEAP_ctr</span><span>
</span><span id="line-503"></span><span>            </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051546"><span class="hs-identifier hs-var">genuine</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">CmmAGraph
</span><a href="GHC.Cmm.Graph.html#mkNop"><span class="hs-identifier hs-var">mkNop</span></a></span><span>
</span><span id="line-504"></span><span>            </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">CmmType -&gt; CLabel -&gt; Int -&gt; CmmAGraph
</span><a href="GHC.StgToCmm.Utils.html#addToMemLbl"><span class="hs-identifier hs-var">addToMemLbl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; CmmType
</span><a href="GHC.Cmm.Type.html#bWord"><span class="hs-identifier hs-var">bWord</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051543"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-505"></span><span>                             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkRtsCmmDataLabel"><span class="hs-identifier hs-var">mkRtsCmmDataLabel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_HEAP_ctr&quot;</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-506"></span><span>                             </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-507"></span><span>            </span><span class="hs-special">]</span><span class="hs-special">}</span><span>
</span><span id="line-508"></span><span>
</span><span id="line-509"></span><span>
</span><span id="line-510"></span><span class="hs-comment">--------------------------------------------------------------------------------</span><span>
</span><span id="line-511"></span><span class="hs-comment">-- these three are only called from GHC.Cmm.Parser (ie ultimately from the RTS)</span><span>
</span><span id="line-512"></span><span>
</span><span id="line-513"></span><span class="hs-comment">-- the units are bytes</span><span>
</span><span id="line-514"></span><span>
</span><span id="line-515"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyAllocPrim"><span class="hs-identifier hs-type">tickyAllocPrim</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>  </span><span class="hs-comment">-- ^ size of the full header, in bytes</span><span>
</span><span id="line-516"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>  </span><span class="hs-comment">-- ^ size of the payload, in bytes</span><span>
</span><span id="line-517"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-518"></span><span id="tickyAllocPrim"><span class="annot"><span class="annottext">tickyAllocPrim :: CmmExpr -&gt; CmmExpr -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyAllocPrim"><span class="hs-identifier hs-var hs-var">tickyAllocPrim</span></a></span></span><span> </span><span id="local-6989586621681051534"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051534"><span class="hs-identifier hs-var">_hdr</span></a></span></span><span> </span><span id="local-6989586621681051533"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051533"><span class="hs-identifier hs-var">_goods</span></a></span></span><span> </span><span id="local-6989586621681051532"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051532"><span class="hs-identifier hs-var">_slop</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-519"></span><span>  </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_PRIM_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-520"></span><span>  </span><span class="annot"><span class="annottext">FastString -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounterByE"><span class="hs-identifier hs-var">bumpTickyCounterByE</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_PRIM_adm&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051534"><span class="hs-identifier hs-var">_hdr</span></a></span><span>
</span><span id="line-521"></span><span>  </span><span class="annot"><span class="annottext">FastString -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounterByE"><span class="hs-identifier hs-var">bumpTickyCounterByE</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_PRIM_gds&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051533"><span class="hs-identifier hs-var">_goods</span></a></span><span>
</span><span id="line-522"></span><span>  </span><span class="annot"><span class="annottext">FastString -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounterByE"><span class="hs-identifier hs-var">bumpTickyCounterByE</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_PRIM_slp&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051532"><span class="hs-identifier hs-var">_slop</span></a></span><span>
</span><span id="line-523"></span><span>
</span><span id="line-524"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyAllocThunk"><span class="hs-identifier hs-type">tickyAllocThunk</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-525"></span><span id="tickyAllocThunk"><span class="annot"><span class="annottext">tickyAllocThunk :: CmmExpr -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyAllocThunk"><span class="hs-identifier hs-var hs-var">tickyAllocThunk</span></a></span></span><span> </span><span id="local-6989586621681051530"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051530"><span class="hs-identifier hs-var">_goods</span></a></span></span><span> </span><span id="local-6989586621681051529"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051529"><span class="hs-identifier hs-var">_slop</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-526"></span><span>    </span><span class="hs-comment">-- TODO is it ever called with a Single-Entry thunk?</span><span>
</span><span id="line-527"></span><span>  </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_UP_THK_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-528"></span><span>  </span><span class="annot"><span class="annottext">FastString -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounterByE"><span class="hs-identifier hs-var">bumpTickyCounterByE</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_THK_gds&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051530"><span class="hs-identifier hs-var">_goods</span></a></span><span>
</span><span id="line-529"></span><span>  </span><span class="annot"><span class="annottext">FastString -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounterByE"><span class="hs-identifier hs-var">bumpTickyCounterByE</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_THK_slp&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051529"><span class="hs-identifier hs-var">_slop</span></a></span><span>
</span><span id="line-530"></span><span>
</span><span id="line-531"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyAllocPAP"><span class="hs-identifier hs-type">tickyAllocPAP</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-532"></span><span id="tickyAllocPAP"><span class="annot"><span class="annottext">tickyAllocPAP :: CmmExpr -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyAllocPAP"><span class="hs-identifier hs-var hs-var">tickyAllocPAP</span></a></span></span><span> </span><span id="local-6989586621681051528"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051528"><span class="hs-identifier hs-var">_goods</span></a></span></span><span> </span><span id="local-6989586621681051527"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051527"><span class="hs-identifier hs-var">_slop</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-533"></span><span>  </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_PAP_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-534"></span><span>  </span><span class="annot"><span class="annottext">FastString -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounterByE"><span class="hs-identifier hs-var">bumpTickyCounterByE</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_PAP_gds&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051528"><span class="hs-identifier hs-var">_goods</span></a></span><span>
</span><span id="line-535"></span><span>  </span><span class="annot"><span class="annottext">FastString -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounterByE"><span class="hs-identifier hs-var">bumpTickyCounterByE</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ALLOC_PAP_slp&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051527"><span class="hs-identifier hs-var">_slop</span></a></span><span>
</span><span id="line-536"></span><span>
</span><span id="line-537"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyHeapCheck"><span class="hs-identifier hs-type">tickyHeapCheck</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-538"></span><span id="tickyHeapCheck"><span class="annot"><span class="annottext">tickyHeapCheck :: FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyHeapCheck"><span class="hs-identifier hs-var hs-var">tickyHeapCheck</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HEAP_CHK_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-539"></span><span>
</span><span id="line-540"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyStackCheck"><span class="hs-identifier hs-type">tickyStackCheck</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-541"></span><span id="tickyStackCheck"><span class="annot"><span class="annottext">tickyStackCheck :: FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#tickyStackCheck"><span class="hs-identifier hs-var hs-var">tickyStackCheck</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var">ifTicky</span></a></span><span> </span><span class="annot"><span class="annottext">(FCode () -&gt; FCode ()) -&gt; FCode () -&gt; FCode ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var">bumpTickyCounter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; FastString
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;STK_CHK_ctr&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-542"></span><span>
</span><span id="line-543"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-544"></span><span class="hs-comment">-- Ticky utils</span><span>
</span><span id="line-545"></span><span>
</span><span id="line-546"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-type">ifTicky</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-547"></span><span id="ifTicky"><span class="annot"><span class="annottext">ifTicky :: FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTicky"><span class="hs-identifier hs-var hs-var">ifTicky</span></a></span></span><span> </span><span id="local-6989586621681051526"><span class="annot"><span class="annottext">FCode ()
</span><a href="#local-6989586621681051526"><span class="hs-identifier hs-var">code</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-548"></span><span>  </span><span class="annot"><span class="annottext">FCode DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span> </span><span class="annot"><span class="annottext">FCode DynFlags -&gt; (DynFlags -&gt; FCode ()) -&gt; FCode ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681051525"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051525"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; FCode () -&gt; FCode ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_Ticky"><span class="hs-identifier hs-var">Opt_Ticky</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051525"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FCode ()
</span><a href="#local-6989586621681051526"><span class="hs-identifier hs-var">code</span></a></span><span>
</span><span id="line-549"></span><span>
</span><span id="line-550"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyAllocdIsOn"><span class="hs-identifier hs-type">tickyAllocdIsOn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-551"></span><span id="tickyAllocdIsOn"><span class="annot"><span class="annottext">tickyAllocdIsOn :: FCode Bool
</span><a href="GHC.StgToCmm.Ticky.html#tickyAllocdIsOn"><span class="hs-identifier hs-var hs-var">tickyAllocdIsOn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_Ticky_Allocd"><span class="hs-identifier hs-var">Opt_Ticky_Allocd</span></a></span><span> </span><span class="annot"><span class="annottext">(DynFlags -&gt; Bool) -&gt; FCode DynFlags -&gt; FCode Bool
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">FCode DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-552"></span><span>
</span><span id="line-553"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyLNEIsOn"><span class="hs-identifier hs-type">tickyLNEIsOn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-554"></span><span id="tickyLNEIsOn"><span class="annot"><span class="annottext">tickyLNEIsOn :: FCode Bool
</span><a href="GHC.StgToCmm.Ticky.html#tickyLNEIsOn"><span class="hs-identifier hs-var hs-var">tickyLNEIsOn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_Ticky_LNE"><span class="hs-identifier hs-var">Opt_Ticky_LNE</span></a></span><span> </span><span class="annot"><span class="annottext">(DynFlags -&gt; Bool) -&gt; FCode DynFlags -&gt; FCode Bool
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">FCode DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-555"></span><span>
</span><span id="line-556"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#tickyDynThunkIsOn"><span class="hs-identifier hs-type">tickyDynThunkIsOn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-557"></span><span id="tickyDynThunkIsOn"><span class="annot"><span class="annottext">tickyDynThunkIsOn :: FCode Bool
</span><a href="GHC.StgToCmm.Ticky.html#tickyDynThunkIsOn"><span class="hs-identifier hs-var hs-var">tickyDynThunkIsOn</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_Ticky_Dyn_Thunk"><span class="hs-identifier hs-var">Opt_Ticky_Dyn_Thunk</span></a></span><span> </span><span class="annot"><span class="annottext">(DynFlags -&gt; Bool) -&gt; FCode DynFlags -&gt; FCode Bool
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">FCode DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-558"></span><span>
</span><span id="line-559"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#ifTickyAllocd"><span class="hs-identifier hs-type">ifTickyAllocd</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-560"></span><span id="ifTickyAllocd"><span class="annot"><span class="annottext">ifTickyAllocd :: FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTickyAllocd"><span class="hs-identifier hs-var hs-var">ifTickyAllocd</span></a></span></span><span> </span><span id="local-6989586621681051519"><span class="annot"><span class="annottext">FCode ()
</span><a href="#local-6989586621681051519"><span class="hs-identifier hs-var">code</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode Bool
</span><a href="GHC.StgToCmm.Ticky.html#tickyAllocdIsOn"><span class="hs-identifier hs-var">tickyAllocdIsOn</span></a></span><span> </span><span class="annot"><span class="annottext">FCode Bool -&gt; (Bool -&gt; FCode ()) -&gt; FCode ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681051518"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051518"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; FCode () -&gt; FCode ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051518"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">FCode ()
</span><a href="#local-6989586621681051519"><span class="hs-identifier hs-var">code</span></a></span><span>
</span><span id="line-561"></span><span>
</span><span id="line-562"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#ifTickyLNE"><span class="hs-identifier hs-type">ifTickyLNE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-563"></span><span id="ifTickyLNE"><span class="annot"><span class="annottext">ifTickyLNE :: FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTickyLNE"><span class="hs-identifier hs-var hs-var">ifTickyLNE</span></a></span></span><span> </span><span id="local-6989586621681051517"><span class="annot"><span class="annottext">FCode ()
</span><a href="#local-6989586621681051517"><span class="hs-identifier hs-var">code</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode Bool
</span><a href="GHC.StgToCmm.Ticky.html#tickyLNEIsOn"><span class="hs-identifier hs-var">tickyLNEIsOn</span></a></span><span> </span><span class="annot"><span class="annottext">FCode Bool -&gt; (Bool -&gt; FCode ()) -&gt; FCode ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681051516"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051516"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; FCode () -&gt; FCode ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051516"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">FCode ()
</span><a href="#local-6989586621681051517"><span class="hs-identifier hs-var">code</span></a></span><span>
</span><span id="line-564"></span><span>
</span><span id="line-565"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#ifTickyDynThunk"><span class="hs-identifier hs-type">ifTickyDynThunk</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-566"></span><span id="ifTickyDynThunk"><span class="annot"><span class="annottext">ifTickyDynThunk :: FCode () -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#ifTickyDynThunk"><span class="hs-identifier hs-var hs-var">ifTickyDynThunk</span></a></span></span><span> </span><span id="local-6989586621681051515"><span class="annot"><span class="annottext">FCode ()
</span><a href="#local-6989586621681051515"><span class="hs-identifier hs-var">code</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FCode Bool
</span><a href="GHC.StgToCmm.Ticky.html#tickyDynThunkIsOn"><span class="hs-identifier hs-var">tickyDynThunkIsOn</span></a></span><span> </span><span class="annot"><span class="annottext">FCode Bool -&gt; (Bool -&gt; FCode ()) -&gt; FCode ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681051514"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051514"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; FCode () -&gt; FCode ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681051514"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">FCode ()
</span><a href="#local-6989586621681051515"><span class="hs-identifier hs-var">code</span></a></span><span>
</span><span id="line-567"></span><span>
</span><span id="line-568"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-type">bumpTickyCounter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-569"></span><span id="bumpTickyCounter"><span class="annot"><span class="annottext">bumpTickyCounter :: FastString -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounter"><span class="hs-identifier hs-var hs-var">bumpTickyCounter</span></a></span></span><span> </span><span id="local-6989586621681051513"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681051513"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLbl"><span class="hs-identifier hs-var">bumpTickyLbl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkRtsCmmDataLabel"><span class="hs-identifier hs-var">mkRtsCmmDataLabel</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681051513"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-570"></span><span>
</span><span id="line-571"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounterBy"><span class="hs-identifier hs-type">bumpTickyCounterBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-572"></span><span id="bumpTickyCounterBy"><span class="annot"><span class="annottext">bumpTickyCounterBy :: FastString -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounterBy"><span class="hs-identifier hs-var hs-var">bumpTickyCounterBy</span></a></span></span><span> </span><span id="local-6989586621681051512"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681051512"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLblBy"><span class="hs-identifier hs-var">bumpTickyLblBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkRtsCmmDataLabel"><span class="hs-identifier hs-var">mkRtsCmmDataLabel</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681051512"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-573"></span><span>
</span><span id="line-574"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounterByE"><span class="hs-identifier hs-type">bumpTickyCounterByE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-575"></span><span id="bumpTickyCounterByE"><span class="annot"><span class="annottext">bumpTickyCounterByE :: FastString -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyCounterByE"><span class="hs-identifier hs-var hs-var">bumpTickyCounterByE</span></a></span></span><span> </span><span id="local-6989586621681051510"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681051510"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLblByE"><span class="hs-identifier hs-var">bumpTickyLblByE</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkRtsCmmDataLabel"><span class="hs-identifier hs-var">mkRtsCmmDataLabel</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681051510"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-576"></span><span>
</span><span id="line-577"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#bumpTickyEntryCount"><span class="hs-identifier hs-type">bumpTickyEntryCount</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-578"></span><span id="bumpTickyEntryCount"><span class="annot"><span class="annottext">bumpTickyEntryCount :: CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyEntryCount"><span class="hs-identifier hs-var hs-var">bumpTickyEntryCount</span></a></span></span><span> </span><span id="local-6989586621681051508"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051508"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-579"></span><span>  </span><span id="local-6989586621681051507"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051507"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-580"></span><span>  </span><span class="annot"><span class="annottext">CmmLit -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLit"><span class="hs-identifier hs-var">bumpTickyLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#cmmLabelOffB"><span class="hs-identifier hs-var">cmmLabelOffB</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051508"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#oFFSET_StgEntCounter_entry_count"><span class="hs-identifier hs-var">oFFSET_StgEntCounter_entry_count</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051507"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-581"></span><span>
</span><span id="line-582"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#bumpTickyAllocd"><span class="hs-identifier hs-type">bumpTickyAllocd</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-583"></span><span id="bumpTickyAllocd"><span class="annot"><span class="annottext">bumpTickyAllocd :: CLabel -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyAllocd"><span class="hs-identifier hs-var hs-var">bumpTickyAllocd</span></a></span></span><span> </span><span id="local-6989586621681051504"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051504"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681051503"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051503"><span class="hs-identifier hs-var">bytes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-584"></span><span>  </span><span id="local-6989586621681051502"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051502"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-585"></span><span>  </span><span class="annot"><span class="annottext">CmmLit -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLitBy"><span class="hs-identifier hs-var">bumpTickyLitBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#cmmLabelOffB"><span class="hs-identifier hs-var">cmmLabelOffB</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051504"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#oFFSET_StgEntCounter_allocd"><span class="hs-identifier hs-var">oFFSET_StgEntCounter_allocd</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051502"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051503"><span class="hs-identifier hs-var">bytes</span></a></span><span>
</span><span id="line-586"></span><span>
</span><span id="line-587"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#bumpTickyLbl"><span class="hs-identifier hs-type">bumpTickyLbl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-588"></span><span id="bumpTickyLbl"><span class="annot"><span class="annottext">bumpTickyLbl :: CLabel -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLbl"><span class="hs-identifier hs-var hs-var">bumpTickyLbl</span></a></span></span><span> </span><span id="local-6989586621681051499"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051499"><span class="hs-identifier hs-var">lhs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLitBy"><span class="hs-identifier hs-var">bumpTickyLitBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#cmmLabelOffB"><span class="hs-identifier hs-var">cmmLabelOffB</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051499"><span class="hs-identifier hs-var">lhs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-589"></span><span>
</span><span id="line-590"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#bumpTickyLblBy"><span class="hs-identifier hs-type">bumpTickyLblBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-591"></span><span id="bumpTickyLblBy"><span class="annot"><span class="annottext">bumpTickyLblBy :: CLabel -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLblBy"><span class="hs-identifier hs-var hs-var">bumpTickyLblBy</span></a></span></span><span> </span><span id="local-6989586621681051498"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051498"><span class="hs-identifier hs-var">lhs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLitBy"><span class="hs-identifier hs-var">bumpTickyLitBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#cmmLabelOffB"><span class="hs-identifier hs-var">cmmLabelOffB</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051498"><span class="hs-identifier hs-var">lhs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-592"></span><span>
</span><span id="line-593"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#bumpTickyLblByE"><span class="hs-identifier hs-type">bumpTickyLblByE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-594"></span><span id="bumpTickyLblByE"><span class="annot"><span class="annottext">bumpTickyLblByE :: CLabel -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLblByE"><span class="hs-identifier hs-var hs-var">bumpTickyLblByE</span></a></span></span><span> </span><span id="local-6989586621681051497"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051497"><span class="hs-identifier hs-var">lhs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLitByE"><span class="hs-identifier hs-var">bumpTickyLitByE</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#cmmLabelOffB"><span class="hs-identifier hs-var">cmmLabelOffB</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681051497"><span class="hs-identifier hs-var">lhs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-595"></span><span>
</span><span id="line-596"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#bumpTickyLit"><span class="hs-identifier hs-type">bumpTickyLit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-597"></span><span id="bumpTickyLit"><span class="annot"><span class="annottext">bumpTickyLit :: CmmLit -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLit"><span class="hs-identifier hs-var hs-var">bumpTickyLit</span></a></span></span><span> </span><span id="local-6989586621681051495"><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681051495"><span class="hs-identifier hs-var">lhs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLitBy"><span class="hs-identifier hs-var">bumpTickyLitBy</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681051495"><span class="hs-identifier hs-var">lhs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-598"></span><span>
</span><span id="line-599"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#bumpTickyLitBy"><span class="hs-identifier hs-type">bumpTickyLitBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-600"></span><span id="bumpTickyLitBy"><span class="annot"><span class="annottext">bumpTickyLitBy :: CmmLit -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLitBy"><span class="hs-identifier hs-var hs-var">bumpTickyLitBy</span></a></span></span><span> </span><span id="local-6989586621681051494"><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681051494"><span class="hs-identifier hs-var">lhs</span></a></span></span><span> </span><span id="local-6989586621681051493"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051493"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-601"></span><span>  </span><span id="local-6989586621681051492"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051492"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode Platform
</span><a href="GHC.StgToCmm.Monad.html#getPlatform"><span class="hs-identifier hs-var">getPlatform</span></a></span><span>
</span><span id="line-602"></span><span>  </span><span class="annot"><span class="annottext">CmmAGraph -&gt; FCode ()
</span><a href="GHC.StgToCmm.Monad.html#emit"><span class="hs-identifier hs-var">emit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmType -&gt; CmmExpr -&gt; Int -&gt; CmmAGraph
</span><a href="GHC.StgToCmm.Utils.html#addToMem"><span class="hs-identifier hs-var">addToMem</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; CmmType
</span><a href="GHC.Cmm.Type.html#bWord"><span class="hs-identifier hs-var">bWord</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051492"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681051494"><span class="hs-identifier hs-var">lhs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051493"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-603"></span><span>
</span><span id="line-604"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#bumpTickyLitByE"><span class="hs-identifier hs-type">bumpTickyLitByE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-605"></span><span id="bumpTickyLitByE"><span class="annot"><span class="annottext">bumpTickyLitByE :: CmmLit -&gt; CmmExpr -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpTickyLitByE"><span class="hs-identifier hs-var hs-var">bumpTickyLitByE</span></a></span></span><span> </span><span id="local-6989586621681051491"><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681051491"><span class="hs-identifier hs-var">lhs</span></a></span></span><span> </span><span id="local-6989586621681051490"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051490"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-606"></span><span>  </span><span id="local-6989586621681051489"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051489"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode Platform
</span><a href="GHC.StgToCmm.Monad.html#getPlatform"><span class="hs-identifier hs-var">getPlatform</span></a></span><span>
</span><span id="line-607"></span><span>  </span><span class="annot"><span class="annottext">CmmAGraph -&gt; FCode ()
</span><a href="GHC.StgToCmm.Monad.html#emit"><span class="hs-identifier hs-var">emit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmType -&gt; CmmExpr -&gt; CmmExpr -&gt; CmmAGraph
</span><a href="GHC.StgToCmm.Utils.html#addToMemE"><span class="hs-identifier hs-var">addToMemE</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; CmmType
</span><a href="GHC.Cmm.Type.html#bWord"><span class="hs-identifier hs-var">bWord</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051489"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681051491"><span class="hs-identifier hs-var">lhs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681051490"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-608"></span><span>
</span><span id="line-609"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#bumpHistogram"><span class="hs-identifier hs-type">bumpHistogram</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Monad.html#FCode"><span class="hs-identifier hs-type">FCode</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-610"></span><span id="bumpHistogram"><span class="annot"><span class="annottext">bumpHistogram :: FastString -&gt; Int -&gt; FCode ()
</span><a href="GHC.StgToCmm.Ticky.html#bumpHistogram"><span class="hs-identifier hs-var hs-var">bumpHistogram</span></a></span></span><span> </span><span id="local-6989586621681051487"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681051487"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681051486"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051486"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-611"></span><span>    </span><span id="local-6989586621681051485"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051485"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-612"></span><span>    </span><span id="local-6989586621681051484"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051484"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FCode Platform
</span><a href="GHC.StgToCmm.Monad.html#getPlatform"><span class="hs-identifier hs-var">getPlatform</span></a></span><span>
</span><span id="line-613"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681051480"><span class="annot"><span class="annottext">offset :: Int
</span><a href="#local-6989586621681051480"><span class="hs-identifier hs-var hs-var">offset</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051486"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><span class="hs-operator hs-var">`min`</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Int
</span><a href="GHC.Driver.Session.html#tICKY_BIN_COUNT"><span class="hs-identifier hs-var">tICKY_BIN_COUNT</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681051485"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-614"></span><span>    </span><span class="annot"><span class="annottext">CmmAGraph -&gt; FCode ()
</span><a href="GHC.StgToCmm.Monad.html#emit"><span class="hs-identifier hs-var">emit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmType -&gt; CmmExpr -&gt; Int -&gt; CmmAGraph
</span><a href="GHC.StgToCmm.Utils.html#addToMem"><span class="hs-identifier hs-var">addToMem</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; CmmType
</span><a href="GHC.Cmm.Type.html#bWord"><span class="hs-identifier hs-var">bWord</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051484"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-615"></span><span>           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width -&gt; CmmExpr -&gt; CmmExpr -&gt; CmmExpr
</span><a href="GHC.Cmm.Utils.html#cmmIndexExpr"><span class="hs-identifier hs-var">cmmIndexExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051484"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-616"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051484"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-617"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CLabel -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmLabel"><span class="hs-identifier hs-var">CmmLabel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FastString -&gt; CLabel
</span><a href="GHC.Cmm.CLabel.html#mkRtsCmmDataLabel"><span class="hs-identifier hs-var">mkRtsCmmDataLabel</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621681051487"><span class="hs-identifier hs-var">lbl</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-618"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681051480"><span class="hs-identifier hs-var">offset</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681051484"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-619"></span><span>           </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-620"></span><span>
</span><span id="line-621"></span><span class="hs-comment">------------------------------------------------------------------</span><span>
</span><span id="line-622"></span><span class="hs-comment">-- Showing the &quot;type category&quot; for ticky-ticky profiling</span><span>
</span><span id="line-623"></span><span>
</span><span id="line-624"></span><span class="annot"><a href="GHC.StgToCmm.Ticky.html#showTypeCategory"><span class="hs-identifier hs-type">showTypeCategory</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span>
</span><span id="line-625"></span><span>  </span><span class="hs-comment">{-
        +           dictionary

        &gt;           function

        {C,I,F,D,W} char, int, float, double, word
        {c,i,f,d,w} unboxed ditto

        T           tuple

        P           other primitive type
        p           unboxed ditto

        L           list
        E           enumeration type
        S           other single-constructor type
        M           other multi-constructor data-con type

        .           other type

        -           reserved for others to mark as &quot;uninteresting&quot;

  Accurate as of Mar 2013, but I eliminated the Array category instead
  of updating it, for simplicity. It's in P/p, I think --NSF

    -}</span><span>
</span><span id="line-651"></span><span id="showTypeCategory"><span class="annot"><span class="annottext">showTypeCategory :: Type -&gt; Char
</span><a href="GHC.StgToCmm.Ticky.html#showTypeCategory"><span class="hs-identifier hs-var hs-var">showTypeCategory</span></a></span></span><span> </span><span id="local-6989586621681051474"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681051474"><span class="hs-identifier hs-var">ty</span></a></span></span><span>
</span><span id="line-652"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Bool
</span><a href="GHC.Core.Predicate.html#isDictTy"><span class="hs-identifier hs-var">isDictTy</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681051474"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'+'</span></span><span>
</span><span id="line-653"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">HasCallStack =&gt; Type -&gt; Maybe (TyCon, [Type])
Type -&gt; Maybe (TyCon, [Type])
</span><a href="GHC.Core.Type.html#tcSplitTyConApp_maybe"><span class="hs-identifier hs-var">tcSplitTyConApp_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681051474"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-654"></span><span>  </span><span class="annot"><span class="annottext">Maybe (TyCon, [Type])
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span>
</span><span id="line-655"></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681051471"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681051471"><span class="hs-identifier hs-var">tycon</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Type]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-656"></span><span>    </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isUnliftedTyCon"><span class="hs-identifier hs-var">isUnliftedTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681051471"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char
</span><a href="../../base/src/GHC.Unicode.html#toLower"><span class="hs-identifier hs-var">Data.Char.toLower</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Char) -&gt; Char -&gt; Char
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-657"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681051462"><span class="annot"><span class="annottext">anyOf :: t Unique -&gt; Bool
</span><a href="#local-6989586621681051462"><span class="hs-identifier hs-var hs-var">anyOf</span></a></span></span><span> </span><span id="local-6989586621681051461"><span class="annot"><span class="annottext">t Unique
</span><a href="#local-6989586621681051461"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Unique
forall a. Uniquable a =&gt; a -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681051471"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="annot"><span class="annottext">Unique -&gt; t Unique -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">t Unique
</span><a href="#local-6989586621681051461"><span class="hs-identifier hs-var">us</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-658"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-659"></span><span>      </span><span class="annot"><span class="annottext">()
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[Unique] -&gt; Bool
forall {t :: * -&gt; *}. Foldable t =&gt; t Unique -&gt; Bool
</span><a href="#local-6989586621681051462"><span class="hs-identifier hs-var">anyOf</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#funTyConKey"><span class="hs-identifier hs-var">funTyConKey</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'&gt;'</span></span><span>
</span><span id="line-660"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[Unique] -&gt; Bool
forall {t :: * -&gt; *}. Foldable t =&gt; t Unique -&gt; Bool
</span><a href="#local-6989586621681051462"><span class="hs-identifier hs-var">anyOf</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#charPrimTyConKey"><span class="hs-identifier hs-var">charPrimTyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#charTyConKey"><span class="hs-identifier hs-var">charTyConKey</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'C'</span></span><span>
</span><span id="line-661"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[Unique] -&gt; Bool
forall {t :: * -&gt; *}. Foldable t =&gt; t Unique -&gt; Bool
</span><a href="#local-6989586621681051462"><span class="hs-identifier hs-var">anyOf</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#doublePrimTyConKey"><span class="hs-identifier hs-var">doublePrimTyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#doubleTyConKey"><span class="hs-identifier hs-var">doubleTyConKey</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'D'</span></span><span>
</span><span id="line-662"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[Unique] -&gt; Bool
forall {t :: * -&gt; *}. Foldable t =&gt; t Unique -&gt; Bool
</span><a href="#local-6989586621681051462"><span class="hs-identifier hs-var">anyOf</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#floatPrimTyConKey"><span class="hs-identifier hs-var">floatPrimTyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#floatTyConKey"><span class="hs-identifier hs-var">floatTyConKey</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'F'</span></span><span>
</span><span id="line-663"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[Unique] -&gt; Bool
forall {t :: * -&gt; *}. Foldable t =&gt; t Unique -&gt; Bool
</span><a href="#local-6989586621681051462"><span class="hs-identifier hs-var">anyOf</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#intPrimTyConKey"><span class="hs-identifier hs-var">intPrimTyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#int32PrimTyConKey"><span class="hs-identifier hs-var">int32PrimTyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#int64PrimTyConKey"><span class="hs-identifier hs-var">int64PrimTyConKey</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-664"></span><span>                 </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#intTyConKey"><span class="hs-identifier hs-var">intTyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#int8TyConKey"><span class="hs-identifier hs-var">int8TyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#int16TyConKey"><span class="hs-identifier hs-var">int16TyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#int32TyConKey"><span class="hs-identifier hs-var">int32TyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#int64TyConKey"><span class="hs-identifier hs-var">int64TyConKey</span></a></span><span>
</span><span id="line-665"></span><span>                </span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'I'</span></span><span>
</span><span id="line-666"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[Unique] -&gt; Bool
forall {t :: * -&gt; *}. Foldable t =&gt; t Unique -&gt; Bool
</span><a href="#local-6989586621681051462"><span class="hs-identifier hs-var">anyOf</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#wordPrimTyConKey"><span class="hs-identifier hs-var">wordPrimTyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#word32PrimTyConKey"><span class="hs-identifier hs-var">word32PrimTyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#word64PrimTyConKey"><span class="hs-identifier hs-var">word64PrimTyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#wordTyConKey"><span class="hs-identifier hs-var">wordTyConKey</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-667"></span><span>                 </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#word8TyConKey"><span class="hs-identifier hs-var">word8TyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#word16TyConKey"><span class="hs-identifier hs-var">word16TyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#word32TyConKey"><span class="hs-identifier hs-var">word32TyConKey</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#word64TyConKey"><span class="hs-identifier hs-var">word64TyConKey</span></a></span><span>
</span><span id="line-668"></span><span>                </span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'W'</span></span><span>
</span><span id="line-669"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[Unique] -&gt; Bool
forall {t :: * -&gt; *}. Foldable t =&gt; t Unique -&gt; Bool
</span><a href="#local-6989586621681051462"><span class="hs-identifier hs-var">anyOf</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Unique
</span><a href="GHC.Builtin.Names.html#listTyConKey"><span class="hs-identifier hs-var">listTyConKey</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'L'</span></span><span>
</span><span id="line-670"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isTupleTyCon"><span class="hs-identifier hs-var">isTupleTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681051471"><span class="hs-identifier hs-var">tycon</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'T'</span></span><span>
</span><span id="line-671"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isPrimTyCon"><span class="hs-identifier hs-var">isPrimTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681051471"><span class="hs-identifier hs-var">tycon</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'P'</span></span><span>
</span><span id="line-672"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isEnumerationTyCon"><span class="hs-identifier hs-var">isEnumerationTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681051471"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'E'</span></span><span>
</span><span id="line-673"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Maybe DataCon -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isJust"><span class="hs-identifier hs-var">isJust</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; Maybe DataCon
</span><a href="GHC.Core.TyCon.html#tyConSingleDataCon_maybe"><span class="hs-identifier hs-var">tyConSingleDataCon_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681051471"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'S'</span></span><span>
</span><span id="line-674"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'M'</span></span><span> </span><span class="hs-comment">-- oh, well...</span><span>
</span><span id="line-675"></span></pre></body></html>